Android - Actionbar not showing in the development preview

后端 未结 4 1745
栀梦
栀梦 2020-12-18 03:17

Actionbar not showing in the development preview but showing normally after running the app, minimum api is 15, tried to delete the them from the manifest file, didn\'t show

相关标签:
4条回答
  • 2020-12-18 04:00

    Check which theme is selected on the top of the XML preview screen.

    enter image description here

    Even if you're using Eclipse, it will look similar.

    Your application is displaying the ActionBar because your AndroidManifest has a theme which displays the ActionBar.

    0 讨论(0)
  • 2020-12-18 04:13

    if you are talking about the preview screen of the android studio/eclipse then note that you can change your theme in the top of the preview, you must have a theme with NoActionBar .

    0 讨论(0)
  • 2020-12-18 04:17

    try this

    values/themes.xml

    <style name="Theme.Mytheme" parent="Theme.AppCompat.Light.NoActionBar">
    
     </style>
    

    and assigns the item in the manifest

    <activity
                android:name=".MainActivity"
                android:label="@string/app_name"
                android:theme="@style/Theme.Mytheme">
     </activity>
    
    0 讨论(0)
  • 2020-12-18 04:18

    If you can't see the action bar AND also the status bar or buttons, it could be because the "Show Layout Decorations" options is turned off in the Layout Editor. Just check this option and everything should be displayed again. As per Android Studio 3.3:

    0 讨论(0)
提交回复
热议问题