Package com.tomtom.tools.android.api.uicontrols.imageview

Types

Link copied to clipboard
data class ImageDescriptor(image: DrawableResolver, imageType: ImageType)

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

Link copied to clipboard
enum ImageType : Enum<ImageType>

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?, defStyleAttr: Int) : 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.

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

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.