1.在项目文件apk/res/drawable/下创建一个cursor.xml
- <?xml version="1.0" encoding="utf-8"?>
- <shape xmlns:android="http://schemas.android.com/apk/res/android">
- <size android:width="2dp" />
- <solid android:color="#000" />
- </shape>
编辑框属性添加
textCursorDrawable=zy.drawable.cursor