0

I am hiding status bar and title bar throught out my app by adding android:theme="@android:style/Theme.NoTitleBar" in android manifest xml file. I am also adding

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);

in each activity. I am able to hide them. But sometimes when my app is loaded it is pushing the page down by taking the statusbar and title bar space. Can any one of you please help me.

tanascius
  • 53,078
  • 22
  • 114
  • 136
sravanthi V
  • 136
  • 11

2 Answers2

0

You should declare one of the above things not both. Either you declare it in the manifest or do it programmatically. Performing both the tasks as you just mentioned can hamper the screen. See this for more details

Community
  • 1
  • 1
Rashmi.B
  • 1,787
  • 2
  • 18
  • 34
0

Declare any one of them and clean and run the program once..

Brian Mains
  • 50,520
  • 35
  • 148
  • 257
user493244
  • 909
  • 7
  • 19