Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide status bar in Android

I referred this link. In that if the user clicks on EditText(for ex To: ) at that time keyboard will be popped out and at the same time the user can be able to scroll to see all remaining views(ex: compose,subject, send button) in that screen. Similarly in my app I have one activity in that I am having some widgets or views. Suppose if the user clicks on Edittext which is in my Activity then keyboard is popping out and i can be able to scroll to see remaining views. But if i give this attribute android:theme="@android:style/Theme.NoTitleBar.Fullscreen" in manifest i was unable to scroll to see remaining views but if give attribute android:theme="@android:style/Theme.NoTitleBar" like this in manifest I can be able to scroll to see remaining view but there is status bar in that screen, here I want full screen and even if the keyboard is popped out I can scroll to see remaining views..? what changes I have to made for this..?

like image 975
user448250 Avatar asked Mar 25 '11 10:03

user448250


People also ask

How do I unhide the status bar on Android?

If you want to bring the Notification Bar back, open Fullscreen: The One Immersive Mode again and tap "Hide Nothing." You can also tap the option next to "Fullscreen" to hide your Notification Bar and your Navigation Bar.


2 Answers

Write this in your Activity

@Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      requestWindowFeature(Window.FEATURE_NO_TITLE);     this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); } 

Check Doc here : https://developer.android.com/training/system-ui/status.html

and your app will go fullscreen. no status bar, no title bar. :)

like image 162
Fugogugo Avatar answered Sep 22 '22 13:09

Fugogugo


Use theme "Theme.NoTitleBar.Fullscreen" and try setting "android:windowSoftInputMode=adjustResize" for the activity in AndroidManifest.xml. You can find details here.

like image 38
Karan Avatar answered Sep 21 '22 13:09

Karan