Package 

Class ImageStore

  • All Implemented Interfaces:
    nl.dionsegijn.konfetti.core.models.CoreImageStore

    
    public final class ImageStore
     implements CoreImageStore<Drawable>
                        

    The ImageStore class is used to store Drawable objects and provide a way to reference them. This is done for performance reasons and to allow the core library, which can't use Android Drawables, to work with images.

    Instead of converting a Drawable to a ByteBuffer, then to a Bitmap, and then back to a Drawable, which is inefficient for the render code, the Drawable is stored in the ImageStore. The rest of the application can then work with a simple integer reference to the Drawable.

    The ImageStore provides methods to store a Drawable and retrieve it using its reference.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageStore()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer storeImage(Drawable image)
      Drawable getImage(Integer id)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait