By default, if you click on an item in the ListView, it will turn blue. I changed the element's background color via View.setBackgroundColor(...)
, the color has changed, but the blue color disappeared when I clicked. How to return it without using xml ?
I asked here because I do not know how to formulate a question in English for Google)
view
as aselector drawable
background with the desired values for thedefault state
and thepressed state
. - falstaf