码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2018-09-07 00:02:18      阅读:326      评论:0      收藏:0      [点我收藏+]

标签:theme   更改   解决方法   resource   文件中   code   resources   tom   不显示   

发现更改了 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控件的解决方法

标签:theme   更改   解决方法   resource   文件中   code   resources   tom   不显示   

原文地址:https://www.cnblogs.com/Draymonder/p/9601874.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!