RemoteActionCompat
class RemoteActionCompat : VersionedParcelable
Represents a remote action that can be called from another process. The action can have an associated visualization including metadata like an icon or title.
This is a backward-compatible version of RemoteAction.
Summary
Public constructors |
|---|
RemoteActionCompat(other: RemoteActionCompat)Constructs a |
RemoteActionCompat( |
Public functions |
|
|---|---|
java-static RemoteActionCompat |
@RequiresApi(value = 26)Creates an RemoteActionCompat from a RemoteAction. |
PendingIntent |
Return the action intent. |
CharSequence |
Return a content description representing the action. |
IconCompat |
getIcon()Return an icon representing the action. |
CharSequence |
getTitle()Return an title representing the action. |
Boolean |
Return whether this action is enabled. |
Unit |
setEnabled(enabled: Boolean)Sets whether this action is enabled. |
Unit |
setShouldShowIcon(shouldShowIcon: Boolean)Sets whether the icon should be shown. |
Boolean |
Return whether the icon should be shown. |
RemoteAction |
@RequiresApi(value = 26)Convert this compat object to |
Public constructors
RemoteActionCompat
RemoteActionCompat(other: RemoteActionCompat)
Constructs a RemoteActionCompat using data from other.
RemoteActionCompat
RemoteActionCompat(
icon: IconCompat,
title: CharSequence,
contentDescription: CharSequence,
intent: PendingIntent
)
Public functions
createFromRemoteAction
@RequiresApi(value = 26)
java-static fun createFromRemoteAction(remoteAction: RemoteAction): RemoteActionCompat
Creates an RemoteActionCompat from a RemoteAction.
getContentDescription
fun getContentDescription(): CharSequence
Return a content description representing the action.
setEnabled
fun setEnabled(enabled: Boolean): Unit
Sets whether this action is enabled.
setShouldShowIcon
fun setShouldShowIcon(shouldShowIcon: Boolean): Unit
Sets whether the icon should be shown.
shouldShowIcon
fun shouldShowIcon(): Boolean
Return whether the icon should be shown.
toRemoteAction
@RequiresApi(value = 26)
fun toRemoteAction(): RemoteAction
Convert this compat object to RemoteAction object.
| Returns | |
|---|---|
RemoteAction |
|