Как отключить панель уведомлений?

Я хочу отключить панель уведомлений с помощью en, но когда я попытался поместить этот код в свой метод OnCreat в основном действии, у меня возникла проблема. я не знаю, что поставить в <height of the status bar>, что такое params я пытался поставить handleParams, у меня есть некоторые проблемы и проблемы с использованием context.getWindow().addView(view, params); неизвестен, и я не могу использовать 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);

person diez    schedule 23.04.2013    source источник
comment
Вот, посмотри. Как ответить[1] stackoverflow.com/questions/4222713/hide-notification-bar   -  person dwbrito    schedule 23.04.2013


Ответы (1)


Просто добавьте в свой манифест:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
person Nickolai Astashonok    schedule 23.04.2013