EditText and Autocompletetextview set text selection color most of the Android ROM, text selected background color is very good bright green, but in some garbage Samsung mobile phone, incredibly blue, disgusting, in fact, can be completely through the program to modify , the text's default check background color.
The API used to explain
Copy Code code as follows:
Android:textcolorhighlight Color of the text selection highlight.
edittext Setting Effect
Autocompletetextview Setting effect
Implementation code
Copy Code code as follows:
<?xml version= "1.0" encoding= "Utf-8"?>
<linearlayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
android:orientation= "Vertical" >
<edittext
Android:id= "@+id/et_inputbox"
android:layout_height= "Wrap_content"
Android:layout_width= "Match_parent"
android:textcolorhighlight= "#B4DF87"
/>
<autocompletetextview
Android:id= "@+id/act_input"
android:layout_below= "@id/et_inputbox"
Android:layout_width= "Fill_parent"
android:layout_height= "Wrap_content"
android:textcolorhighlight= "#B4DF87"
/>
</LinearLayout>