`
407827531
  • 浏览: 1060446 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

修改光标颜色

阅读更多

推荐安卓开发神器(里面有各种UI特效和android代码库实例)

在使用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)
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics