Search code examples
androidxmlandroid-actionbarmanifest

Android Studio - Action Bar remove


I'm trying to remove/disable the ActionBar. I tried to put in the Manifest:

<activity
    ...
    android:theme="@android:style/Theme.NoTitleBar"
</activity>

and it doesn't work. It doesn't remove the ActionBar. Please help me. Thanks.


Solution

  • in your oncreate() method use this

    getActionBar().hide();
    

    If your minSdkVersion is 10 or lower, instead use:

    getSupportActionBar().hide();