Android activity hide action bar

If the Action bar of an Android’s activity needs to be hidden through the manifest xml file (non Java Programming), then the easy way is to add the following attribute in Activity tag:

android:theme="@style/Theme.NoActionBar"

However, if a custom Theme is created then it is convenient to create another style extending the custom theme and then adding the following two items in it.

        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>

Suppose, the default theme is called MyTheme, then we create a new Theme called NoActionBar, and add the following two items.

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

Then, simply refer by using the NoActionBar Theme

android:theme="@style/NoActionBar"