装订线中没有XML颜色预览 [英] No XML color preview in gutter

查看:99
本文介绍了装订线中没有XML颜色预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试了几乎所有内容之后,我无法在Android Studio的XML编辑器中显示颜色预览.在我的 colors.xml 文件中,我希望像< color name ="colorAccent">#1AD270</color> 这样的线在左侧显示一个小方块在装订线中预览颜色.

After trying just about everything, I cannot get the color preview to show in the XML editor in Android Studio. In my colors.xml file, I expect a line like <color name="colorAccent">#1AD270</color> to show a small square to the left of it in the gutter previewing the color.

奇怪的是,它只发生在这个特定的项目中.当我打开其他Android Studio项目时,装订线图标会正常显示.

Weirdly, it only happens in this particular project. When I open other Android Studio projects, the gutter icons appear normally.

我已经完全重置了我的Android Studio设置,已禁用/启用的装订线图标并更改了装订线背景,但所有操作均无效.有什么帮助吗?

I have completely reset my Android Studio settings, disabled/enabled gutter icons and changed the gutter background, none of which worked. Any help?

推荐答案

结果表明,如果您的项目中没有任何活动,则不会显示颜色预览.添加第一个活动后,颜色预览图标突然出现.奇怪!

Turns out that the color previews do not show up if you don't have an activity in your project. After adding the first activity, the color preview icons suddenly appear. Weird!

这篇关于装订线中没有XML颜色预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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