In the following picture you can see an android.widget.EditText
(left half) where some text is selected:
Strange thing is: You can see the start开发者_运维问答 and end marker of the selection but the actual selection is not highlighted.
I wonder what I forgot or what I did wrong here. How can I ensure that the selected area is highlighted using an appropriate background colour?
for more on StateList, refer this http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
After a little more experimenting I found the following:
- the colour of the selection background is indeed set by
android:textColorHighlight
. - The selection is not highlighted when the entry field is in read only mode.
So for me there is nothing to be done about it and i just have to live without a highlighted selection.
精彩评论