类 EaseImageCache.ImageCacheParams

  • 封闭类:
    EaseImageCache

    public static class EaseImageCache.ImageCacheParams
    extends java.lang.Object
    A holder class that contains cache parameters.
    • 字段详细资料

      • memCacheSize

        public int memCacheSize
      • compressQuality

        public int compressQuality
      • memoryCacheEnabled

        public boolean memoryCacheEnabled
      • initDiskCacheOnCreate

        public boolean initDiskCacheOnCreate
    • 构造器详细资料

      • ImageCacheParams

        public ImageCacheParams()
    • 方法详细资料

      • setMemCacheSizePercent

        public void setMemCacheSizePercent​(float percent)
        Sets the memory cache size based on a percentage of the max available VM memory. Eg. setting percent to 0.2 would set the memory cache to one fifth of the available memory. Throws IllegalArgumentException if percent is < 0.01 or > .8. memCacheSize is stored in kilobytes instead of bytes as this will eventually be passed to construct a LruCache which takes an int in its constructor.

        This value should be chosen carefully based on a number of factors Refer to the corresponding Android Training class for more discussion: http://developer.android.com/training/displaying-bitmaps/

        参数:
        percent - Percent of available app memory to use to size memory cache