How to set color of selection in EditText in my cu

2019-06-08 03:47发布

问题:

I created my custom theme and in my layouts I have a couple of EditText views. Since I set

android:selectAllOnFocus="true"

,I've noticed that the color of selection is default one for my phone, so I was wondering can I set some attribute and which, of course, in my definition of my theme to have a desired effect, i.e. set the color of selection to needed color?

Best, Deveti

回答1:

Set android:textColorHighlight to your preferred color.