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"
Written by Rafael Oliveira
Related protips
3 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#