修改光标颜色
16lz
2021-12-04
推荐安卓开发神器(里面有各种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
.
更多相关文章
- Android(安卓)基本控件Text属性
- android中的ellipsize设置(省略号的问题)
- android 备忘
- android 滚动条 相关属性
- Android设置颜色的几种方法
- Android中gravity与layout_gravity的区别
- Android(安卓)设置完autoLink属性后自定义跳转到指定界面
- android 常用 属性
- 【Android常用控件】EditText常用属性【二】:为文本输入框指定软