Alert

@CarProtocol
@RequiresCarApi(value = 5)
public final class Alert


Represents an alert with an optional icon, subtitle and actions.

Summary

Nested types

public final class Alert.Builder

A builder of Alert.

Public methods

boolean
@NonNull List<Action>

Returns the List of Actions associated with the alert.

@Nullable AlertCallbackDelegate

Returns the AlertCallbackDelegate that should be used for this alert.

long

Returns the maximum duration in milli seconds for which the alert can be shown.

@Nullable CarIcon

Returns the CarIcon to display in the alert or null if the alert does not have an icon.

int

Returns the id of the alert.

@Nullable CarText

Returns the subtitle displayed in the alert or null if the alert does not have a subtitle.

@NonNull CarText

Returns the title displayed in the alert.

int
@NonNull String

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getActions

Added in 1.2.0
public @NonNull List<ActiongetActions()

Returns the List of Actions associated with the alert.

See also
addAction

getCallbackDelegate

Added in 1.2.0
public @Nullable AlertCallbackDelegate getCallbackDelegate()

Returns the AlertCallbackDelegate that should be used for this alert.

See also
Alert.Builder

getDurationMillis

Added in 1.2.0
public long getDurationMillis()

Returns the maximum duration in milli seconds for which the alert can be shown.

getIcon

Added in 1.2.0
public @Nullable CarIcon getIcon()

Returns the CarIcon to display in the alert or null if the alert does not have an icon.

See also
setIcon

getId

Added in 1.2.0
public int getId()

Returns the id of the alert.

getSubtitle

Added in 1.2.0
public @Nullable CarText getSubtitle()

Returns the subtitle displayed in the alert or null if the alert does not have a subtitle.

See also
setSubtitle

getTitle

Added in 1.2.0
public @NonNull CarText getTitle()

Returns the title displayed in the alert.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()