1. 程式人生 > >EditText 游標位置 顏色設定

EditText 游標位置 顏色設定

一 EditText游標本來位置是左側居中的,如想改變位置如下;
  android:gravity="top|left"
二 EditText游標顏色也可以改變;
    1.res-drawable 建立edittext_cursor_color.xml 
	
	<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="#00B7EE"/>
    <size android:width="2dp"/>
    </shape>
	
	2.然後佈局當中使用;
	  android:textCursorDrawable="@drawable/edittext_cursor_color"