Example #1
0
        public static AndroidImageLoader ShowImage(ImageView pictureView, View spinner, AndroidImageLoader loader, string animalImageName)
        {
            AndroidViewHandler imageSetter = new AndroidViewHandler();

            imageSetter.SetInvisible(pictureView);
            if (AndroidConnectionTest.IsNetworkAvailable())
            {
                imageSetter.SetVisible(spinner);

                if (loader != null && !loader.IsCancelled)
                {
                    loader.Cancel(true);
                    loader.Dispose();
                }
                string currentImageName = animalImageName;
                loader = new AndroidImageLoader(pictureView, spinner);
                loader.Execute(currentImageName);
            }
            else
            {
                imageSetter.SetInvisible(spinner);
            }

            return(loader);
        }
Example #2
0
 private void ShowImage()
 {
     this.loader = MainActivity.ShowImage(this.pictureView, this.spinner, this.loader, this.favourites.GetCurrentFavourite().GetImageName());
 }
Example #3
0
 private void ShowImage()
 {
     this.loader = MainActivity.ShowImage(this.pictureView, this.spinner, this.loader, this.handler.GetCurrentWordImageName());
 }
 private void ShowImage()
 {
     this.loader = MainActivity.ShowImage(this.pictureView, this.spinner, this.loader, this.handler);
 }