sdk-maps / com.tomtom.online.sdk.map / Icon / Factory

Factory

open class Factory

Factory class used to create an Icon instance.

Constructors

<init>

Factory()

Factory class used to create an Icon instance.

Functions

fromAssets

open static fun fromAssets(context: Context!, fileName: String!): Icon

Load icon from assets. Apart from standard formats (e.g. PNG), allows also to load GIFs. File name is used as a name. Icon scale is set to 1.0.

open static fun fromAssets(context: Context!, fileName: String!, scale: Double): Icon

Load icon from assets. Apart from standard formats (e.g. PNG), allows also to load GIFs. File name is used as a name.

fromDrawable

open static fun fromDrawable(name: String, drawable: Drawable): Icon

Load icon from drawables. Scale set to 1.0.

open static fun fromDrawable(name: String, drawable: Drawable, scale: Double): Icon

Load icon from drawables.

fromLayerDrawable

open static fun fromLayerDrawable(name: String!, layerDrawable: LayerDrawable): Icon

Load icon from layer drawables. Scale set to 1.0.

open static fun fromLayerDrawable(name: String!, layerDrawable: LayerDrawable, scale: Double): Icon

Load icon from layer drawables.

fromResources

open static fun fromResources(context: Context, id: Int): Icon

Load icon from resources. Resource id is used as a name. Scale set to 1.0.

open static fun fromResources(context: Context, id: Int, scale: Double): Icon

Load icon from resources. Resource id is used as a name.