Android Studio布局设计视图显示升级到v3.0后的覆盖图 [英] Android Studio layout design view shows overlay after upgrade to v3.0

查看:120
本文介绍了Android Studio布局设计视图显示升级到v3.0后的覆盖图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到Android Studio v3.0后,我所有布局的设计视图如下所示,即ActionBarOverlayLayout覆盖了整个设计图,并且该应用程序甚至不使用动作栏.

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.

清单中的application元素为:

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">

AppTheme在styles.xml中定义为

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>

推荐答案

更改Apptheme的父样式

Change parent style of Apptheme

发件人:

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

收件人:

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

我希望它会有所帮助.

这篇关于Android Studio布局设计视图显示升级到v3.0后的覆盖图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆