Package 

Class MemorySizeCalculator


  • 
    public final class MemorySizeCalculator
    
                        

    A calculator that tries to intelligently determine cache sizes for a given device based on some constants and the devices screen density, width, and height.

    • Method Summary

      Modifier and Type Method Description
      int getBitmapPoolSize() Returns the recommended bitmap pool size for the device it is run on in bytes.
      int getMemoryCacheSize() Returns the recommended memory cache size for the device it is run on in bytes.
      int getArrayPoolSizeInBytes() Returns the recommended array pool size for the device it is run on in bytes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBitmapPoolSize

         int getBitmapPoolSize()

        Returns the recommended bitmap pool size for the device it is run on in bytes.

      • getMemoryCacheSize

         int getMemoryCacheSize()

        Returns the recommended memory cache size for the device it is run on in bytes.

      • getArrayPoolSizeInBytes

         int getArrayPoolSizeInBytes()

        Returns the recommended array pool size for the device it is run on in bytes.