How to save 4.1 theme and remove TitleBar in Android?

When I created a new Android application in Eclipse. In his AndroidManifest.xml theme installed for the application is android:theme="@style/AppTheme" & style.xml as follows.

  <resources> <style name="AppTheme" parent="android:Theme.Light" /> </resources> 

& my screen is as follows. Image when android: theme = "@ style / AppTheme" is set.

I want to remove the TitleBar from the application, but I want to show the theme of Android 4.1.

For this I tried

 <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" > 

Now my screen looks like this: TitleBar is deleted, but the theme has changed.

Image when android: theme = "@ android: style / Theme.Light.NoTitleBar is set.

Please help me deal with this issue.

+4
source share
2 answers

Use this instead: @android:style/Theme.Holo.NoActionBar .

+6
source

Try putting this in your manifest.

 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
0
source

All Articles