如何在突出显示时更改文本的颜色?这是我曾尝试:EditText突出显示的文本颜色
edittext_text_color.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="#FFFFFF"/>
<item android:state_selected="false" android:color="@color/custom_blue"/>
</selector>
some_layout.xml:
<org.holoeverywhere.widget.EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="5dp"
android:background="@android:drawable/editbox_background_normal"
android:ems="10"
android:gravity="right"
android:inputType="textPersonName"
android:textColor="@drawable/edittext_text_color"
android:textCursorDrawable="@null">
正常状态:
强调状态:
我想在突出显示文本什么:
改变一些颜色,看看会发生什么。 并看到这一个http://developer.android.com/resources/articles/touch-mode.html可能会有所帮助 –
http://developer.android.com/guide/topics/resources/color-list-resource.html检查这一个可能它会帮助你 –
@PratikButani我玩过很多颜色,但没有帮助。 –