首页>>移动互联网>>Android修改EditText的光标颜色
Android修改EditText的光标颜色
来源: 时间: 2015-04-06 18:51:03

在使用EditText的XML 文件中加入一个属性:


android:textCursorDrawable="@null"


android:textCursorDrawable   这个属性是用来控制光标颜色的,


"@null"   是作用是让光标颜色和text color一样


android:textCursorDrawable 的用法可以查看android sdk


public static final int TextView_textCursorDrawable


Reference to a drawable that will be drawn under the insertion cursor.


Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".


This corresponds to the global attribute resource symbol textCursorDrawable.

Constant Value: 70 (0x00000046)

本页地址:http://www.easytd.com/yidonghulianwang/d_15040618272.html

上一篇:Android设置模拟器窗口大小的方法 下一篇:Android NDK编译错误:undefined reference to JNI_CreateJavaVM