Last active
October 8, 2015 09:08
-
-
Save arsenikt/3e88c0618297985ecd96 to your computer and use it in GitHub Desktop.
Create hide impossible fullscreen view.Swipes for show status bar and navigation bar blocked.Show it after display power on (lock screen).
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
| requestWindowFeature(Window.FEATURE_NO_TITLE); | |
| getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
| getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); | |
| WindowManager.LayoutParams handleParams = new WindowManager.LayoutParams( | |
| WindowManager.LayoutParams.MATCH_PARENT, | |
| WindowManager.LayoutParams.MATCH_PARENT, | |
| WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, | |
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | | |
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | | |
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN, | |
| PixelFormat.TRANSLUCENT); | |
| handleParams.gravity = Gravity.TOP; | |
| WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); | |
| windowManager.addView(mMainLayout, handleParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment