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

查看:23
本文介绍了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.

在清单中,应用程序元素是:

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 一样定义在 style.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天全站免登陆