我想设计一个自定义的文本选择器,当用户单击TextView时更改文本颜色.但是出现以下错误:
java.lang.RuntimeException:无法启动活动ComponentInfo {}:android.view.InflateException:二进制XML文件行#55:错误膨胀类
这是我有的:
绘制/ text_selector.xml
android:state_focused="true"
android:drawable="@color/black" />
android:drawable="@color/blue" />
android:drawable="@color/black" />
布局/ textview.xml
android:text="@string/last_page_button_string"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffffff"
android:textColor = "@drawable/text_selector"
android:layout_weight="1" />
值/ color.xml
#ffffffff
#ff000000
#ffccddff