Assets

open class Assets

Class for accessing image assets from the snabble backend. Assets are images that are downloaded all at once at first use and then saved to disk for reuse. They change very very rarely and are mostly for context (shop symbol / retailer logo / checkout orientation).

Types

Link copied to clipboard
interface Callback
Callback for receiving a bitmap
Link copied to clipboard
enum Type
Enum class for describing the image type

Functions

Link copied to clipboard
open fun get(name: String, callback: Assets.Callback)
open fun get(name: String, async: Boolean, callback: Assets.Callback)
Get a bitmap from a given name.
open fun get(name: String, type: Assets.Type, async: Boolean, callback: Assets.Callback)
Get a bitmap from a given name and type.
Link copied to clipboard
open fun getBitmap(name: String): Bitmap
Get a bitmap from a given name
open fun getBitmap(name: String, type: Assets.Type): Bitmap
Get a bitmap from a given name and type
Link copied to clipboard
open fun update()
Downloads all assets related to the project and saved them to disk.