Last Updated: February 25, 2016
·
3.601K
· rafaelcgo

Android Theme Without ActionBar

Add this to styles.xml

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
        <!-- Customize your theme here. -->
    </style>

    <style name="NoActionBar" parent="AppTheme">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
    </style>
</resources>

Then add to the desired activity:

android:theme="@style/NoActionBar"

3 Responses
Add your response

Java alternative
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().hide(); ... }

over 1 year ago ·

@gpedro, is it more expensive to hide the actionBar programmatically?

over 1 year ago ·

@rafaelcgo, it's more agile! But the right way is using styles/themes.

over 1 year ago ·