我想改变这种闪烁在Android领域的EditText光标的宽度和颜色。这可能吗?
I want to change the width and color of the cursor that blinks in an Android EditText field. Is that possible?
RES /绘制/ cursor_red.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<size
android:width="5dip" />
<solid
android:color="@color/red" />
</shape>
在你的EditText:
android:textCursorDrawable="@drawable/cursor_red"
请注意:只有API 12及以上
note: only API 12 and above