Created
October 18, 2015 09:26
-
-
Save cesarferreira/298d7e420cc85c2d0f88 to your computer and use it in GitHub Desktop.
[android] Adding views to services (yes, it's possible)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); | |
| WindowManager.LayoutParams windowParams = new WindowManager.LayoutParams( | |
| LayoutParams.MATCH_PARENT, LayoutParams. WRAP_CONTENT, | |
| WindowManager.LayoutParams.TYPE_PHONE, | |
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, | |
| PixelFormat.TRANSLUCENT); | |
| windowManager.addView(listView, windowParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment