Setting Drawable as text color raise an exception 'Color value must start with #'

雨燕双飞 提交于 2019-12-05 06:13:41

The problem may be@drawble/text_color_drawable: it shouldn't be a 'drawable', but rather a
'color'. Basically what you currently have is a StateListDrawable, but what you really want is a ColorStateList. Both are quite similar, but live in different places in the resources.

That being said, try moving the file from res/drawable to res/color. When you then assign the resource as text color, it should say: android:textColor="@color/text_color_drawable"

In my case a refresh button has helped. It is placed in a small toolbar over a design view, near magnifiers (with icons like 1:1, +, -).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!