android studio 3.3 not showing action bar and stat

2019-02-21 01:53发布

android studio 3.3 not showing action bar and status bar in its preview window after creating new project.i already tried this in build.graadle(module:app) file (implementation'com.android.support:appcompat-v7:28.0.0-alpha1')

enter image description here

2条回答
再贱就再见
2楼-- · 2019-02-21 02:07
 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

Try this on your styles.xml

查看更多
劳资没心,怎么记你
3楼-- · 2019-02-21 02:28

In the preview tab, click on the eye and select 'Show Layout Decorations'.

enter image description here

EDIT: Toolbar isn't showing because of my style settings - I used 'NoActionBar'. This should work for you, though.

查看更多
登录 后发表回答