Android: how to hide ActionBar on certain activities
Solution 1:
As you are asking about how to hide in a certain activity, this is what you need :
getSupportActionBar().hide();
Solution 2:
Apply the following in your Theme for the Activity in AndroidManifest.xml
:
<activity android:name=".Activity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
That should do the trick.
Solution 3:
1.Go to your manifest.xml
file.
2.Find
the activity tag
for which you want to hide your ActionBar and then add
,
android:theme="@style/Theme.AppCompat.NoActionBar"
<activity
android:name=".MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
>
Solution 4:
If you want to get full screen without actionBar and Title.
Add it in style.xml
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
and use the style at activity of manifest.xml.
<activity ....
android:theme="@style/AppTheme.NoActionBar" > ......
</activity>