Android Studio布局预览默认主题 [英] Android Studio Layout Preview Default Theme

查看:389
本文介绍了Android Studio布局预览默认主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许这是Android Studio中众所周知的选项,但是我找不到它,而Google并没有帮助我:(每次我在Android Studio中打开布局预览时,都会将Material.Light主题应用到我的每个布局中项目,我需要手动应用自己的主题以查看其在真实应用中的外观.有人知道如何在Android Studio中使用布局预览器"预览布局时将默认的Material.Light主题更改为我的自定义主题,所以我不不需要每次都手动应用它吗?

Maybe this is well known option in Android Studio but I couldn't find it and Google has not helped me with this :( Every time I open a layout preview in Android Studio it's applying Material.Light theme to every layout in my project and I need manually apply my own theme to see how it will look like in a real app. Does somebody know how to change default Material.Light theme to be my custom theme when previewing layout with Layout Previewer in Android Studio so I don't need to apply it manually every time?

谢谢.

推荐答案

单击此处,将主题更改为您的主题.

Click here and change theme to your theme.

如果您希望始终打开一个主题,请给

If you want a single theme to always open, give

android:theme="@style/YourTheme".

从下一次开始,当您创建新的xml文件时,这将是您的默认主题.

From next time onwards, when you create a new xml file, this will be your default theme.

这篇关于Android Studio布局预览默认主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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