BannerElement


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


An internal wrapper class for elements (actions, icons, images) that can be displayed as leading or trailing items in a Banner.

Summary

Constants

const Int

Type indicating the element is an Action.

const Int

Type indicating the element is an image/icon.

Public functions

Boolean
equals(other: Any?)
Action?

Returns the Action in this element, or null if not set.

CarIcon?

Returns the CarIcon in this element, or null if not set.

Int

Returns the image type of the element.

Int

Returns the type of the element.

Int
String

Constants

TYPE_ACTION

Added in 1.9.0-alpha02
const val TYPE_ACTION = 1: Int

Type indicating the element is an Action.

TYPE_IMAGE

Added in 1.9.0-alpha02
const val TYPE_IMAGE = 2: Int

Type indicating the element is an image/icon.

Public functions

equals

fun equals(other: Any?): Boolean

getAction

Added in 1.9.0-alpha02
fun getAction(): Action?

Returns the Action in this element, or null if not set.

Actions with no getOnClickDelegate should be treated like icons.

getImage

Added in 1.9.0-alpha02
fun getImage(): CarIcon?

Returns the CarIcon in this element, or null if not set.

The host should check getType and getImageType to determine whether this should be rendered as an icon or an image.

getImageType

Added in 1.9.0-alpha02
fun getImageType(): Int

Returns the image type of the element.

getType

Added in 1.9.0-alpha02
fun getType(): Int

Returns the type of the element.

hashCode

fun hashCode(): Int

toString

fun toString(): String