1
Я хотел бы отключить панель уведомлений, используя en, но когда я попытался поместить этот код в свой метод OnCreat в основной Activity, у меня есть некоторые проблемы. Я не знаю, что положить в <height of the status bar>
, что такое params
Я попытался поставить handleParams
, у меня есть проблема и проблема с использованием context.getWindow().addView(view, params)
; является Unkown и я не могу использовать context.getWindow()
Как отключить панель уведомлений?
View disableStatusBar = new View(context);
WindowManager.LayoutParams handleParams = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FILL_PARENT,
<height of the status bar>,
// This allows the view to be displayed over the status bar
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
// this is to keep button presses going to the background window
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
// this is to enable the notification to recieve touch events
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
// Draws over status bar
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.TRANSLUCENT);
params.gravity = Gravity.TOP;
context.getWindow().addView(view, params);
Здесь, придать ему вид. [Ответить] [1] http://stackoverflow.com/questions/4222713/hide-notification-bar – dwbrito