Created
December 25, 2013 08:45
-
-
Save songzhiyong/8121452 to your computer and use it in GitHub Desktop.
This file contains 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.LayoutParams params = new WindowManager.LayoutParams( | |
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY, | |
WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, PixelFormat.TRANSLUCENT); | |
params.gravity = Gravity.CENTER; | |
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); | |
wm.addView(view, params); | |
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TYPE_TOAST make it