I want to hide the title bar (where the activity tile is shown) in my application. I'm doing this by setting the android:windowNoTitle
item to true
. This works fine for devices with API level 19. I tested it with a device running API level 10 and it only hides the notification bar. The tile bar is still shown.
Here is my res/values/styles.xml
<resources>
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
EDIT: I'm using the AppBaseTheme
as the theme in my manifest. There are no other styles.xml files in any other value-vXX folder.
Edit#2: I'm extending an ActionBarActivity
for my activity.
I tried the android:style/Theme.NoTitleBar.Fullscreen
in styles.xml but I got:
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
So I followed the advise to stick to the AppCompat theme, and could hide statusbar and actionbar using the following lines in styles.xml
:
<resources>
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>
try using this
<style name="MyMaterialDialog" parent="Base.Theme.AppCompat.Light.Dialog.MinWidth"> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> </style>
remove android prefix!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With