android Edittext在输入时更改文本的颜色背景

android Edittext在输入时更改文本的颜色背景,android,android-edittext,Android,Android Edittext,我已经编辑过这样的文本: <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:hint="input something" android:layout_weight="1" android:textSize="20sp"

我已经编辑过这样的文本:

<EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:hint="input something"
            android:layout_weight="1"
            android:textSize="20sp"
            android:textColor="#04ff00"
            android:textColorHint="#0094fd"/>

这是一个结果:

与图像一样,我希望在输入edittext时更改文本的背景。

如何操作?

要实现该行为,请将
textcorhighlight
添加到您的
EditText

<EditText
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:hint="input something"
      android:layout_weight="1"
      android:textSize="20sp"
      android:textColor="#04ff00"
      android:textColorHint="#0094fd"
      android:textColorHighlight="@android:color/holo_red_light"/>

最终结果如下:

为了确定,您想更改所选文本的背景色,对吗?我在genymotion中尝试过,没问题。但当在真实设备上测试使用安卓5.0.2时,情况并非如此。嗯,我用安卓M检查了我的Nexus5X,它看起来还不错。。。你能提供更多的细节或者尝试一个干净的版本吗?哦,这是我的错。很抱歉。多谢各位