15
我想更改在Android EditText字段中閃爍的光標的寬度和顏色。那可能嗎?我可以在android編輯文本字段中更改光標大小嗎?
我想更改在Android EditText字段中閃爍的光標的寬度和顏色。那可能嗎?我可以在android編輯文本字段中更改光標大小嗎?
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"
注:僅12 API及以上