Setting the android:textCursorDrawable
attribute to @null
should result in the use ofandroid:textColor
as the cursor color.
本文共 972 字,大约阅读时间需要 3 分钟。
这个问题主要出现在当在Android Manifest文件中设置android:minSdkVersion或android:targetSdkVersion为13或更高的数值后,原因是因为系统默认的主题所致,所以要进行特别的定义。
通过以下方法来解决:
android:textCursorDrawable="@null"
这样会使光标的颜色与文字颜色的属性一致
另外也可以用自定义的图片资源,但好像在4.2的系统上无效,设置为null是OK的~
这个属性在低版本的系统上会被忽略,不用担心没有这个属性会造成崩溃。
下面是stackoverflow上的讨论:
56 | Setting the | |||
转载地址:http://zoitb.baihongyu.com/
target
>3.2 in your manifest you can use it and it will be ignored for lower versions –