How to disable action bar permanently
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"
....
>
I use the following code inside my onCreate function:
ActionBar actionBar = getSupportActionBar();
actionBar.hide();
Source: https://developer.android.com/guide/topics/ui/actionbar.html
<application
.
.
android:theme="@android:style/Theme.Holo.Light.NoActionBar"
. >
maybe this help you
With the Android Studio default generated Activity superclass is ActionBarActivity
and then, none of solution in other responses works. To solve just change superclass:
public class xxxActivity extends ActionBarActivity{
to:
public class xxxActivity extends Activity {