I can hide the action bar in honeycomb using this code:
getActionBar().hide();
But when the keyboard opens, and user copy-pastes anything, the action bar shows again. How can I disable the action bar permanently?
If you want to hide Action Bar from the entire application (from all Activities and fragments), then you can use this method. Just go to res -> values -> styles. xml and change the base application to “Theme. AppCompat.
If we want to remove the ActionBar only from specific activities, we can create a child theme with the AppTheme as it's parent, set windowActionBar to false and windowNoTitle to true and then apply this theme on an activity level by using the android:theme attribute in the AndroidManifest. xml file.
If you are using Theme.Holo.Light
and want to use the Theme.Holo.Light.NoActionBar
variant on pre 3.2 devices you can add this to your styles.xml
:
<style name="NoActionBar" parent="@android:style/Theme.Holo.Light">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
and then set it as your activity's theme:
<activity android:theme="@style/NoActionBar" ... />
By setting activity theme in Manifest,
<activity
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
....
>
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