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.BuilderA builder of |
Constants |
|
|---|---|
static final int |
DURATION_SHOW_INDEFINITELY = 2147483647By setting the alert duration to this value, the progress bar (timer) on the alert will not be shown. |
Public methods |
|
|---|---|
boolean |
|
@NonNull List<Action> |
|
@Nullable AlertCallbackDelegate |
Returns the |
long |
Returns the maximum duration in milli seconds for which the alert can be shown. |
@Nullable CarIcon |
getIcon()Returns the |
int |
getId()Returns the id of the alert. |
@Nullable CarText |
Returns the subtitle displayed in the alert or |
@NonNull CarText |
getTitle()Returns the title displayed in the alert. |
int |
hashCode() |
@NonNull String |
toString() |
Constants
DURATION_SHOW_INDEFINITELY
public static final int DURATION_SHOW_INDEFINITELY = 2147483647
By setting the alert duration to this value, the progress bar (timer) on the alert will not be shown.
Public methods
getActions
public @NonNull List<Action> getActions()
Returns the List of Actions associated with the alert.
| See also | |
|---|---|
addAction |
getCallbackDelegate
public @Nullable AlertCallbackDelegate getCallbackDelegate()
Returns the AlertCallbackDelegate that should be used for this alert.
| See also | |
|---|---|
Alert.Builder |
getDurationMillis
public long getDurationMillis()
Returns the maximum duration in milli seconds for which the alert can be shown.
getIcon
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 |
getSubtitle
public @Nullable CarText getSubtitle()
Returns the subtitle displayed in the alert or null if the alert does not have a subtitle.
| See also | |
|---|---|
setSubtitle |