RemoteActionCompat
class RemoteActionCompat : VersionedParcelable
kotlin.Any | |
↳ | androidx.core.app.RemoteActionCompat |
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 | |
---|---|
<init>(@NonNull icon: IconCompat, @NonNull title: CharSequence, @NonNull contentDescription: CharSequence, @NonNull intent: PendingIntent) |
|
<init>(@NonNull other: RemoteActionCompat) Constructs a |
Public methods | |
---|---|
static RemoteActionCompat |
createFromRemoteAction(@NonNull remoteAction: RemoteAction) 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 |
Convert this compat object to |
Public constructors
<init>
RemoteActionCompat(
@NonNull icon: IconCompat,
@NonNull title: CharSequence,
@NonNull contentDescription: CharSequence,
@NonNull intent: PendingIntent)
<init>
RemoteActionCompat(@NonNull other: RemoteActionCompat)
Constructs a RemoteActionCompat
using data from other
.
Public methods
createFromRemoteAction
@RequiresApi(26) @NonNull static fun createFromRemoteAction(@NonNull remoteAction: RemoteAction): RemoteActionCompat
Creates an RemoteActionCompat from a RemoteAction.
getContentDescription
@NonNull fun getContentDescription(): CharSequence
Return a content description representing the action.
setShouldShowIcon
fun setShouldShowIcon(shouldShowIcon: Boolean): Unit
Sets whether the icon should be shown.
toRemoteAction
@RequiresApi(26) @NonNull fun toRemoteAction(): RemoteAction
Convert this compat object to RemoteAction
object.
Return | |
---|---|
RemoteAction |
RemoteAction object |