-
public class APDownloader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAPDownloader.APDownloadCallback
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGpublic final static intIMAGE_CACHE_LIMIT_SIZEpublic final static intVIDEO_FILE_CACHE_LIMIT_SIZEpublic final static intIMAGE_STORAGE_MAX_CACHE_SIZEpublic static WeakHashMap<String, Bitmap>mImageCachepublic static ArrayList<String>cacheKeyListpublic static intDEFAULT_SAMPLE_SIZE
-
Method Summary
Modifier and Type Method Description static voidclearImageCache(Context context)static voiddeleteVideoCache(Context context)static voidsetContext(Context ctx)static voiddownloadCallback(Context context, String url, ImageView imageView, int imageViewWidth, int imageViewHeight, APDownloader.APDownloadCallback callback)static voidpreImageDownload(Context context, String url, int imageViewWidth, int imageViewHeight)static voidpreVideoDownload(Context context, String url)static intcalculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight)static StringisLocalFileExist(Context context, String url, boolean isVideo)static StringcomputeHashedName(String name)-
-
Method Detail
-
clearImageCache
static void clearImageCache(Context context)
-
deleteVideoCache
static void deleteVideoCache(Context context)
-
setContext
static void setContext(Context ctx)
-
downloadCallback
static void downloadCallback(Context context, String url, ImageView imageView, int imageViewWidth, int imageViewHeight, APDownloader.APDownloadCallback callback)
-
preImageDownload
static void preImageDownload(Context context, String url, int imageViewWidth, int imageViewHeight)
-
preVideoDownload
static void preVideoDownload(Context context, String url)
-
calculateInSampleSize
static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight)
-
isLocalFileExist
static String isLocalFileExist(Context context, String url, boolean isVideo)
-
computeHashedName
static String computeHashedName(String name)
-
-
-
-