Answer the question
In order to leave comments, you need to log in
How to access an item from a specific row of a listView?
I'm a newbie, please help me figure it out. To understand the question, I will give an example: let's say I have a listView, 2 text fields in each line, already filled through a simpleAdapter, and there is a button. How to make it so that by clicking on this button, for example, the font color of one specific text field of one specific line of the list changes?
Answer the question
In order to leave comments, you need to log in
The easiest option is to add a tag (setTag) to each button, in which you specify the ID of the list line in which you want to change the color.
In clickListener you get this same tag (getTag), knowing it, you get the list line, well, then you already do what you want with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question