T
T
TimkaTV2015-06-09 14:01:31
Android
TimkaTV, 2015-06-09 14:01:31

Selecting a list item?

Good afternoon, There is a custom adapter and a list. How to make the text color change when selecting elements, and when released, it becomes the same. Tried AdapterView.OnItemSelectedListener() but its methods are not called at all. Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2015-06-09
@gadfi

in my opinion, you don’t need to pull it into the adapter, put it in xml

D
drYOM, 2015-06-09
@drYOM

As an option, assign an onItemClickListener () to the ListView and specify the selector in the xml file, in which to assign the text color when the state is "pressed".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question