Reputation: 591
Check the below image I need same things in my app. I wanted to hide just actionbar not statusbar(titlebar). I use below code where both actionbar and statusbar hide.
<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>
Upvotes: 0
Views: 904
Reputation: 2327
By using this code, you can hide actionbar
and statubar
will remain in design.
Just add this in your style.xml
<style name="AppTheme.NooActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
add below code in your AndroidManifest.xml
<activity
android:name=".LoginActivity"
android:theme="@style/AppTheme.NooActionBar" />
Upvotes: 4