I want to hide the titlebar for some of my activities. The problem is that I applied a style to all my activities, therefore I can\'t simply set the theme to @android:
I don't like the this.requestWindowFeature(Window.FEATURE_NO_TITLE); because the title bar appears briefly, then disappears.
I also don't like the android:theme="@android:style/Theme.NoTitleBar" because I lost all of the 3.0+ Holo changes that the users of the new devices have gotten used to. So I came across this solution.
In your res/values folder make a file called styles.xml (If it doesn't already exist). In that file place the following code:
Next create a res/values-v11 with another styles.xml file (Once again this may already exist). In that file place the following code:
And if you are targeting 4.0+, create a res/values-v14 folder with yet another styles.xml file (Yes it may already be there). In that file place the following code:
Finally, with all of these files created, open your AndroidManifiest.xml file you can add the code:
android:theme="@style/Theme.NoTitle"
to the activity tag of the activity you want no title for or the application tag if you want it to apply to the entire application.
Now your users will get the themes associated with their device version with the screen layout you desire.
P.S. Changing the value to android:theme="@style/Theme.FullScreen" will have the same effect, but also remove Notification bar.