Ejemplo n.º 1
0
		async void RetrieveArtistPicture (ArtistItemView view, ArtistData artist)
		{
			Bitmap bmp = null;
			if (cache.TryGet (artist.PictureUrl, out bmp)) {
				view.SetArtistImage (bmp, immediate: true);
				return;
			}
			var id = view.VersionID;
			bmp = await FetchBitmap (artist.PictureUrl);
			if (view.VersionID == id)
				view.SetArtistImage (bmp, immediate: false);
		}
Ejemplo n.º 2
0
        ArtistItemView EnsureView(View convertView)
        {
            var view = convertView as ArtistItemView;

            if (view == null)
            {
                view = new ArtistItemView(context);
            }
            else
            {
                Interlocked.Increment(ref view.VersionID);
                view.Reset();
            }
            return(view);
        }
Ejemplo n.º 3
0
        async void RetrieveArtistPicture(ArtistItemView view, ArtistData artist)
        {
            Bitmap bmp = null;

            if (cache.TryGet(artist.PictureUrl, out bmp))
            {
                view.SetArtistImage(bmp, immediate: true);
                return;
            }
            var id = view.VersionID;

            bmp = await FetchBitmap(artist.PictureUrl);

            if (view.VersionID == id)
            {
                view.SetArtistImage(bmp, immediate: false);
            }
        }
Ejemplo n.º 4
0
		ArtistItemView EnsureView (View convertView)
		{
			var view = convertView as ArtistItemView;
			if (view == null)
				view = new ArtistItemView (context);
			else {
				Interlocked.Increment (ref view.VersionID);
				view.Reset ();
			}
			return view;
		}