Android Studio Design界面不显示layout控件的解决方法

Posted Draymonder

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio Design界面不显示layout控件的解决方法相关的知识,希望对你有一定的参考价值。

发现更改了 layout里面的xml文件后  切换到design后,没有显示控件

解决方法

解决办法:

在 res/values/styles.xml 文件中  将原有的 前面添加 Base.

Theme.AppCompat.Light.DarkActionBar 


如下图所示
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Base.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>

</resources>

 

以上是关于Android Studio Design界面不显示layout控件的解决方法的主要内容,如果未能解决你的问题,请参考以下文章