public NativeBrowseCell(Context context, BrowseCell cell) : base(context) { NativeCell = cell; var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.NativeBrowseCell, null); Title = view.FindViewById <TextView>(Resource.Id.Title); Overview = view.FindViewById <TextView>(Resource.Id.Overview); ImageView = view.FindViewById <ImageView>(Resource.Id.Image); AddView(view); }
public void UpdateCell(BrowseCell cell) { Title.Text = cell.Title; Overview.Text = cell.Overview; // Dispose of the old image if (ImageView.Drawable != null) { using (var image = ImageView.Drawable as BitmapDrawable) { if (image != null) { if (image.Bitmap != null) { image.Bitmap.Dispose(); } } } } SetImage(cell.ImgUrl); }