改变的EditText光标颜色 [英] change edittext cursor color
本文介绍了改变的EditText光标颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何修改的EditText的
的光标的颜色的编程?
在安卓4.0及以上的光标颜色的是白色的。如果的EditText
的背景也是白色的,它变得不可见。
In android 4.0 and above, cursor color is white. and if EditText
s background is also white, it becomes invisible.
推荐答案
在你的EditText属性外,还有一个属性安卓textCursorDrawable
In your EditText properties, there is an attribute android:textCursorDrawable
现在将其设置为 @null 喜欢,
安卓textCursorDrawable =@空
所以,现在你的EditText光标是一样的你的EditText TEXTCOLOR。
So now your EditText Cursor is same as your EditText TextColor.
这篇关于改变的EditText光标颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文