Android Studio layout design view shows overlay after upgrade to v3.0

雨燕双飞 提交于 2019-12-09 01:33:28

问题


After upgrading to Android Studio v3.0 the design view for all my layouts look like below, i.e. ActionBarOverlayLayout covers the whole design surface, and the app does not even use the actionbar.

In the manifest the application element is:

<application
    android:name=".MyAppName"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

And AppTheme is defined in styles.xml like

<style name="AppTheme" parent="Theme.AppCompat">
    <item name="android:colorBackground">?attr/colorPrimaryDark</item>
    <item name="android:textColor">@color/colorWhite</item>
    <item name="android:itemBackground">@color/colorControlActivated</item>

</style>

回答1:


Change parent style of Apptheme

From:

<style name="AppTheme" parent="Theme.AppCompat">

To:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

I hope it will help.



来源:https://stackoverflow.com/questions/47330684/android-studio-layout-design-view-shows-overlay-after-upgrade-to-v3-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!