So, for example I have some ListView lv
.
In each item in lv I got TextView tv
.
Now I want to search each tv
in lv
and if I find tv
with text I wanted to find, then I want to color this specific item.
I tried that: android - listview get item view by position and then color an item, but it crashed.
Sorry, I deleted the code (was trying several methods).
Any idea how to do it? Thx for help ;)
Edit:
I know I can use custom adapter etc. But I want to avoid creating new adapters due to optimization.
List View: 1, 2, 3
User clicks button to find 2
TextView with 2 has to change background to red
I wanted to create some loop to go through variables, if found change color of an item and break the loop.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…