1
edittextにフォーカスがあるときに、その色を変更したedittextを持つアプリケーションを作成しています。私は2つの9のパッチを作成して、背景を設定し、このXMLによるが、試してみたスタイルEditTextアンダーラインカラーandroid
:ビューにフォーカスがあるときには、このような何かを白い色を持っている必要がある場合、通常の色は、青でなければなりませんその機能していないようです。どのように私はこれを達成することができます誰に教えてください?
のXmlセレクター:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_focused="true"
android:drawable="@drawable/spelling_blue" />
<item android:state_window_focused="false" android:state_enabled="true"
android:drawable="@drawable/spelling_white" />
<item android:drawable="@drawable/spelling_white" />
</selector>
おかげ
http://stackoverflow.com/questions/35262935/android-edittext-bottom-line-color-and-theme-changes/35263829#35263829はそれに役立つことを願って、これを試してください君は。 –
どのようなリソースがありますか? spelling_blueとspelling_whiteを表示できますか? – manao
<?xml version = "1.0" encoding = "utf-8"?> <セレクタxmlns:android = "http://schemas.android.com/apk/res/android">- android:state_focused = "true" android:drawable = "@ drawable/spelling_blue" />
–
Alexander