I have a ListView
which displays news items. They contain an image, a title and some text. The image is loaded in a separate thread (with a queue and all) and w
I found the answer, thanks to your information Michelle.
You can indeed get the right view using View#getChildAt(int index)
. The catch is that it starts counting from the first visible item. In fact, you can only get the visible items. You solve this with ListView#getFirstVisiblePosition()
.
Example:
private void updateView(int index){
View v = yourListView.getChildAt(index -
yourListView.getFirstVisiblePosition());
if(v == null)
return;
TextView someText = (TextView) v.findViewById(R.id.sometextview);
someText.setText("Hi! I updated you manually!");
}