Background


@CarProtocol
@ExperimentalCarApi
@RequiresCarApi(value = 9)
class Background


A background for a user interface component.

The image or color will be modified to ensure safe a color contrast ratio with the content.

The background can be set as either a solid color using CarColor or an image using CarIcon. Only one of these can be set at a time.

Summary

Nested types

A builder of Background.

Constants

const Background

A transparent background.

Public functions

Boolean
equals(other: Any?)
CarColor?

Returns the CarColor used for the background, or null if not set.

CarIcon?

Returns the CarIcon associated with this background, or null if not set.

Int
String

Constants

TRANSPARENT

Added in 1.8.0
const val TRANSPARENTBackground

A transparent background.

Public functions

equals

fun equals(other: Any?): Boolean

getColor

Added in 1.8.0
fun getColor(): CarColor?

Returns the CarColor used for the background, or null if not set.

getImage

Added in 1.8.0
fun getImage(): CarIcon?

Returns the CarIcon associated with this background, or null if not set.

hashCode

fun hashCode(): Int

toString

fun toString(): String