修改EditText的光標顏色



EditText有一個屬性:android:textCursorDrawable,這個屬性是用來控制光標顏色的

android:textCursorDrawable="@null","@null"做用是讓光標顏色和textcolor同樣



PS:

textcursordrawable 在framework 的textview 中有這個 它表明的就是光標,是一張點9圖片 ,只要去換這張圖片能夠了

這張圖片在framework/core/res/res/values/themes.xml 中去更換。
在應用層也能夠再editText中設置android:textCursorDrawable="@drawable/ic_png"也能夠更換光標
相關文章
相關標籤/搜索