开发者

Modify a ListView after setting adapter

开发者 https://www.devze.com 2023-03-14 05:19 出处:网络
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:

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().

0

精彩评论

暂无评论...
验证码 换一张
取 消