Home | History | Annotate | Download | only in xmladapters

Lines Matching defs:imageView

33 import android.widget.ImageView;
48 * This helper class download images from the Internet and binds those with the provided ImageView.
90 * Download the specified image from the Internet and binds it to the provided ImageView. The
92 * otherwise. A null bitmap will be associated to the ImageView if an error occurs.
95 * @param imageView The ImageView to bind the downloaded image to.
97 public void download(String url, ImageView imageView) {
98 download(url, imageView, null);
102 * Same as {@link #download(String, ImageView)}, with the possibility to provide an additional
106 * @param imageView The ImageView to bind the downloaded image to.
109 public void download(String url, ImageView imageView, String cookie) {
114 forceDownload(url, imageView, cookie);
116 cancelPotentialDownload(url, imageView);
117 imageView.setImageBitmap(bitmap);
124 private void forceDownload(String url, ImageView view) {
133 private void forceDownload(String url, ImageView imageView, String cookie) {
136 imageView.setImageDrawable(null);
140 if (cancelPotentialDownload(url, imageView)) {
141 BitmapDownloaderTask task = new BitmapDownloaderTask(imageView);
143 imageView.setImageDrawable(downloadedDrawable);
168 private static boolean cancelPotentialDownload(String url, ImageView imageView) {
169 BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);
184 * @param imageView Any imageView
185 * @return Retrieve the currently active download task (if any) associated with this imageView.
188 private static BitmapDownloaderTask getBitmapDownloaderTask(ImageView imageView) {
189 if (imageView != null) {
190 Drawable drawable = imageView.getDrawable();
238 private final WeakReference<ImageView> imageViewReference;
240 public BitmapDownloaderTask(ImageView imageView) {
241 imageViewReference = new WeakReference<ImageView>(imageView);
313 * Once the image is downloaded, associates it to the imageView
329 ImageView imageView = imageViewReference.get();
330 BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);
333 imageView.setImageBitmap(bitmap);
348 * A fake Drawable that will be attached to the imageView while the download is in progress.