Android – Hide Title bar and Notification bar

By -


Here i am going to discuss about on making activity full-screen by hiding Title bar and notification bar from the activity.  So question here is:

Android – How do we hide Title bar?

//write before setContentView()

Android – How do we hide Notification bar?

//write before setContentView()
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);


And yes, we can achieve the same by defining attribute value inside the AndroidManifest.xml file:

<activity android:name=".MainActivity"
Paresh Mayani

Lazy android developer, exploring the horizon of android development since 7 years, currently working as a Technical Lead - Android at Simform Solutions, India. Former Application Architect at KarConnect. He is the Head/Organizer of Google Developers Group (GDG), Ahmedabad

Loading Facebook Comments ...
Loading Disqus Comments ...