在android的输入框里,如果要修改光标的颜色及粗细步骤如下两步即可搞定:
1.在资源文件drawable下新建一个光标控制color_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="1dp" />
<solid android:color="#008000" />
</shape>
1.在资源文件drawable下新建一个光标控制color_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="1dp" />
<solid android:color="#008000" />
</shape>
2.设置EditText:android:textCursorDrawable="@drawable/color_cursor"
http://liyanjie918.blog.163.com/blog/static/202272902014111755847606/