Alert
@CarProtocol
@RequiresCarApi(value = 5)
class Alert
Represents an alert with an optional icon, subtitle and actions.
Summary
Nested types |
|---|
class Alert.BuilderA builder of |
Constants |
|
|---|---|
const Int |
DURATION_SHOW_INDEFINITELY = 2147483647By setting the alert duration to this value, the progress bar (timer) on the alert will not be shown. |
Public functions |
|
|---|---|
Boolean |
|
(Mutable)List<Action!> |
|
AlertCallbackDelegate? |
Returns the |
Long |
Returns the maximum duration in milli seconds for which the alert can be shown. |
CarIcon? |
getIcon()Returns the |
Int |
getId()Returns the id of the alert. |
CarText? |
Returns the subtitle displayed in the alert or |
CarText |
getTitle()Returns the title displayed in the alert. |
Int |
hashCode() |
String |
toString() |
Constants
DURATION_SHOW_INDEFINITELY
const val DURATION_SHOW_INDEFINITELY = 2147483647: Int
By setting the alert duration to this value, the progress bar (timer) on the alert will not be shown.
Public functions
getActions
fun getActions(): (Mutable)List<Action!>
Returns the List of Actions associated with the alert.
| See also | |
|---|---|
addAction |
getCallbackDelegate
fun getCallbackDelegate(): AlertCallbackDelegate?
Returns the AlertCallbackDelegate that should be used for this alert.
| See also | |
|---|---|
Alert.Builder |
getDurationMillis
fun getDurationMillis(): Long
Returns the maximum duration in milli seconds for which the alert can be shown.
getIcon
fun getIcon(): CarIcon?
Returns the CarIcon to display in the alert or null if the alert does not have an icon.
| See also | |
|---|---|
setIcon |
getSubtitle
fun getSubtitle(): CarText?
Returns the subtitle displayed in the alert or null if the alert does not have a subtitle.
| See also | |
|---|---|
setSubtitle |