0

Check the below image I need same things in my app. enter image description here 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> 
2
  • 1
    you don't have a toolbar/actionbar in this activity i guess. Commented Nov 14, 2019 at 6:55
  • I think you are confused about the status bar and action bar. Commented Nov 14, 2019 at 6:58

1 Answer 1

4

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" /> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.