Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Notification bar

Tags:

android

Anyone know how to disable/hide notification bar at the top which show battery and other things in android. Any help will be appreciated.

EDIT: Please also add how can I hide ActionBar+NotificationBar for later android versions.

like image 688
Hassan Jawed Avatar asked Nov 19 '10 06:11

Hassan Jawed


People also ask

Can you hide notification bar on lock screen?

Select Notifications on lock screen to enable that feature. You have three choices for how (or if) to show notifications on the lock screen. You can also choose to show or not show sensitive information on your lock screen by toggling “Sensitive notifications” on or off.

How do I get rid of notification bar pulldown?

It's one of the options in the System UI Tuner menu. any options you want to remove from the notification bar. Tap on any of the switches to turn them on or off. This removes these options from the notification bar.


1 Answers

You could use a theme in your AndroidManifest.xml:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 

or change parent of your AppTheme to @android:style/Theme.NoTitleBar.Fullscreen like this

<style name="AppTheme" parent="Theme.NoTitleBar.Fullscreen"> </style> 

then apply this theme on activities which you want Fullscreen like

android:theme="@style/AppTheme" 

or use the following code snippet:

public class FullScreen     extends android.app.Activity {     @Override     public void onCreate(android.os.Bundle savedInstanceState)     {         super.onCreate(savedInstanceState);          requestWindowFeature(Window.FEATURE_NO_TITLE);         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,                                 WindowManager.LayoutParams.FLAG_FULLSCREEN);          setContentView(R.layout.main);     } } 
like image 187
Martin Avatar answered Sep 18 '22 21:09

Martin