在drawable中写cursor_shap.xml文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#000000" />
<size android:width="1dp"/>
</shape>
在想设置的EditText添加属性
android:textCursorDrawable="@drawable/cursor_shape"