Badge


@CarProtocol
@ExperimentalCarApi
class Badge


Represents a badge that can be displayed as an overlay on top of an image.

A badge denotes some sort of call to action, notification, alert, etc. An example is badging of application icons in a launcher to add a number which denotes how many active notifications that application has.

Badges may have a dot which is a colored circle appearing in a different location to the icon.

Summary

Nested types

A builder of Badge.

Public functions

Boolean
equals(other: Any?)
CarColor?

This function is deprecated.

use getDotColor instead.

CarColor?

Returns the dot color.

CarIcon?

Returns the badge icon.

CarColor?

Returns the icon background color.

Boolean

Returns whether the badge has a dot.

Int
String

Public functions

equals

fun equals(other: Any?): Boolean

getBackgroundColor

Added in 1.4.0
Deprecated in 1.8.0-alpha01
fun getBackgroundColor(): CarColor?

Returns the dot background color.

getDotColor

Added in 1.8.0-alpha01
fun getDotColor(): CarColor?

Returns the dot color.

getIcon

Added in 1.4.0
fun getIcon(): CarIcon?

Returns the badge icon.

See also
setIcon

getIconBackgroundColor

Added in 1.8.0-alpha01
fun getIconBackgroundColor(): CarColor?

Returns the icon background color.

hasDot

Added in 1.4.0
fun hasDot(): Boolean

Returns whether the badge has a dot.

See also
setHasDot

hashCode

fun hashCode(): Int

toString

fun toString(): String