您可以在edittext中使用android:textCursorDrawable="@drawable/mycursor"
并创建如下形状:
mycursor.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" />
<solid android:color="@android:color/holo_blue_light"/>
</shape>