答案 0 :(得分:0)
res/drawable/custom_cursor.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="2dp"// cursor width
android:height="28dp" />// cursor height should be noted that the height can not be set edittext adaptation, otherwise, the cursor height or size of the input character
<solid android:color="@color/azure" />// color of the cursor
<padding // This parameter allows the cursor is highly inconsistent with the text size, text size I need is here 14dp
android:bottom="7dp"
android:top="7dp" />
</shape>
在您的编辑文本中:
android:textCursorDrawable="@drawable/custom_cursor"