How to set color of selection in EditText in my custom theme? (android)

a 夏天 提交于 2019-12-23 01:12:34

问题


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.



来源:https://stackoverflow.com/questions/28466172/how-to-set-color-of-selection-in-edittext-in-my-custom-theme-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!