EditTextのカーソル色の変更
760 ワード
この方法はandroid 4.0に適用される.
EditTextを使用するXMLファイルに属性を追加します.
android:textCursorDrawable="@null"android:textCursorDrawableこのプロパティはカーソルの色を制御するために使用され、"@null"はカーソルの色をtext colorと同じようにandroid:textCursorDrawableの使い方でandroid sdkを表示することができます
public static final int TextView_textCursorDrawable
Reference to a drawable that will be drawn under the insertion cursor.
Must be a reference to another resource, in the form "
This corresponds to the global attribute resource symbol
Constant Value: 70 (0x00000046)
EditTextを使用するXMLファイルに属性を追加します.
android:textCursorDrawable="@null"android:textCursorDrawableこのプロパティはカーソルの色を制御するために使用され、"@null"はカーソルの色をtext colorと同じようにandroid:textCursorDrawableの使い方でandroid sdkを表示することができます
public static final int TextView_textCursorDrawable
Reference to a drawable that will be drawn under the insertion cursor.
Must be a reference to another resource, in the form "
@[+][package:]type:name
"or to a theme attribute in the form "?[package:][type:]name
". This corresponds to the global attribute resource symbol
textCursorDrawable
. Constant Value: 70 (0x00000046)