2011-06-03 60 views

回答

23

RES /繪製/ cursor_red.xml:

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="rectangle" > 
    <size 
     android:width="5dip" /> 
    <solid 
     android:color="@color/red" /> 
</shape> 

在你的EditText:

android:textCursorDrawable="@drawable/cursor_red" 

注:僅12 API及以上

相關問題