Package-level declarations

Types

Link copied to clipboard
data class ImageDescriptor(val image: DrawableResolver, val imageType: ImageType = ImageType.DEFAULT)

A data class containing the information needed to display an image in common TomTom UI controls.

Link copied to clipboard

Describes what an image represents. Different types will be handled differently according to the use cases.

Link copied to clipboard
class TtRoundedImageCardView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : CardView

A reusable UI control that can be used for displaying rounded images.

Functions

Link copied to clipboard
fun TtRoundedImageCardView.setImageType(imageType: ImageType?, @ColorInt tintableIconTint: Int?)

Updates the radius and tint of the TtRoundedImageCardView based on the imageType. tintableIconTint will be applied to TtRoundedImageCardView.ttImageTint while the imageType is ImageType.TINTABLE_ICON. If imageType is null the radius and tint are cleared.

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

A convenience function to create a LiveData mapping from a nullable DrawableResolver to an ImageDescriptor with the provided imageType.

A convenience function to create a LiveData mapping from a 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.

@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.