Reputation: 1043
I am using an activity in my app as TYPE_SYSTEM_ALERT (which uses SYSTEM_ALERT_WINDOW as permission). My code snippet for WindowManager is
final WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN,
PixelFormat.TRANSLUCENT);
The activity is working fine as per my need except that the status bar is also visible and I want to hide that too. I tried out different flags but no luck.
Also, I tried TYPE_SYSTEM_OVERLAY but then I was not able to interact with buttons, editTexts and other widgets. And also, the status bar was visible in this TYPE_SYSTEM_OVERLAY too.
Any suggestions from Android experts here??
Upvotes: 2
Views: 1335