Hello.
To display asynchonous pics to my listview, with one or more http
connexions, i wrote a special thread, and change Imageitem.setImageDrawable.
But there is a problem with this system.... i must put a unique id for each
ImageView in listview, load the item ImageView into a list, and just
view.Addview(Imageitem) if item imageview is not null to not do a new
ImageView() when Getview is call
But GREF inscrease :(, and application crash if i scroll lot of!
The best Getview to not have increase GREF (0 increase more), is :
public override View GetView(int position, View convertView,
ViewGroup parent)
{
var view = (convertView ??
inflater.Inflate(Resource.Layout.DialogCategoriesLigne, parent, false)) as
LinearLayout;
var ImageItem =
view.FindViewById(Resource.Id.imageItemDialogCategoriesLigne) as ImageView;
var Description =
view.FindViewById(Resource.Id.descriptionDialogCategoriesLigne) as TextView;
var Nbimages =
view.FindViewById(Resource.Id.nbimgDialogCategoriesLigne) as TextView;
ImageItem.SetImageResource(Resource.Drawable.DefaultImageMenu);
Description.SetText(listetext[position].description);
Nbimages.SetText(listetext[position].description);
return view
}
The problem with it, i can't put a unique Id to my ImageItem, and in my
independant Thread, i can't change the pic.
If i just do in my independant thread a ImageItem.setImageDrawable, all pics
are loaded in the first listview item....
Somone have a idea ?
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid