List of usage examples for android.widget ImageView setMinimumHeight
@RemotableViewMethod public void setMinimumHeight(int minHeight)
From source file:pk.onlinebazaar.helpers.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from w w w .j a va 2 s.c o m private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case NO_DOWNLOADED_DRAWABLE_WITHOUT_IMAGEVIEW: BitmapDownloaderTask taskNull = new BitmapDownloaderTask(null); taskNull.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:com.esource42.whyapp.utility.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from w w w . j av a 2 s.c o m private void forceDownload(String url, ImageView imageView, ProgressBar progress) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView, progress); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView, progress); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:org.everyuse.android.util.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *//*from w ww .java 2s . c o m*/ private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:com.redhering.nunuaraha.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not * used. Kept private at the moment as its interest is not clear. *///from w ww . j a v a 2s .c o m private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in // DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(30); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(30); task.execute(url); break; } } }
From source file:com.glue.client.android.util.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not * used. Kept private at the moment as its interest is not clear. *//*from w ww . j a v a 2 s. com*/ private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in // DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:com.app.hutbay.utility.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from ww w . ja v a 2 s.c om private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); //imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:com.androidtest.HttpParser2.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *//*from w w w .j ava 2 s. c o m*/ private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { //Log.d(TAG,"Mode : "+mode); switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:cat.joronya.utils.image.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from w w w. ja va 2s .c o m private void forceDownload(String url, ImageView imageView) { // State sanity: url is guaranteed to never be null in DownloadedDrawable and cache keys. if (url == null) { imageView.setImageDrawable(defaultDrawable); return; } if (cancelPotentialDownload(url, imageView)) { BitmapDownloaderTask task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); } }
From source file:com.life.wuhan.util.ImageDownloader.java
private void forceDownload(String url, ImageView imageView) { if (url == null) { imageView.setImageDrawable(null); return;//from ww w . j a v a2 s . c om } if (cancelPotentialDownload(url, imageView)) { switch (mode) { case NO_ASYNC_TASK: Bitmap bitmap = downloadBitmap(url); addBitmapToCache(url, bitmap); imageView.setImageBitmap(bitmap); break; case NO_DOWNLOADED_DRAWABLE: imageView.setMinimumHeight(156); BitmapDownloaderTask task = null; task = new BitmapDownloaderTask(imageView); task.execute(url); break; case CORRECT: task = new BitmapDownloaderTask(imageView); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(imageView.getResources(), task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); break; } } }
From source file:com.slava.android.utils.ImageDownloader.java
/** * Same as download but the image is always downloaded and the cache is not used. * Kept private at the moment as its interest is not clear. *///from w w w . j a v a 2 s .co m private void forceDownload(String url, ImageView imageView, int cornersRadius) { // State sanity: url is guaranteed to never be null in // DownloadedDrawable and cache keys. if (url == null || url.equals("")) { imageView.setImageDrawable(null); return; } if (cancelPotentialDownload(url, imageView)) { BitmapDownloaderTask task = new BitmapDownloaderTask(imageView, cornersRadius); DownloadedDrawable downloadedDrawable = new DownloadedDrawable(imageView.getResources(), mLoadingIndicator, task); imageView.setImageDrawable(downloadedDrawable); imageView.setMinimumHeight(156); task.execute(url); } }