Modify a ListView after setting adapter
I set an Adapter to a ListView:
myListView.setAdapter(new listAdapter(this));
in this adapter, I do some operations and I set an Image to the imageView in each lines of the ListView:
holder.image.setImageDrawable(anImage)
I开发者_高级运维 also have 2 RadioButtons in the project, and what I want to do is changing the image of ONE listView when I check a RadioButton.
My problem: I don't know how "recover" an Image of a line. Does anyone know how I can do it?
Need some help, please.
Call ListView.invalidateViews()
. That'll trigger a redraw and set the correct image in getView()
or bindView()
.
精彩评论