QuantityIconDrawableResolver

data class QuantityIconDrawableResolver(quantity: Int, @AttrRes iconSize: Int, @AttrRes backgroundColor: Int, @AttrRes textAppearance: Int, @AttrRes textColor: Int) : DrawableResolver

A drawable resolver that creates an icon filled with a background color and a quantity value with a density based on context used to resolve the icon.

Parameters

quantity

A quantity in range [0..QUANTITY_MAX_VALUE]; value is clamped to those boundaries otherwise.

Constructors

Link copied to clipboard
fun QuantityIconDrawableResolver(quantity: Int, @AttrRes iconSize: Int, @AttrRes backgroundColor: Int, @AttrRes textAppearance: Int, @AttrRes textColor: Int)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun get(context: Context): Drawable

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Extensions

Link copied to clipboard
@JvmName(name = "toImageDescriptorOrNull")
fun DrawableResolver?.toImageDescriptor(imageType: ImageType = ImageType.DEFAULT): ImageDescriptor?

A convenience function to map a nullable DrawableResolver to an ImageDescriptor with the provided imageType.

fun DrawableResolver.toImageDescriptor(imageType: ImageType = ImageType.DEFAULT): ImageDescriptor

A convenience function to map a DrawableResolver to an ImageDescriptor with the provided imageType.