SliceAction

public class SliceAction
extends Object implements SliceAction

java.lang.Object
   ↳ androidx.slice.builders.SliceAction


Class representing an action, supports tappable icons, custom toggle icons, and default toggles, as well as date and time pickers.

Summary

Public methods

static SliceAction create(PendingIntent action, IconCompat actionIcon, int imageMode, CharSequence actionTitle)

Construct a SliceAction representing a tappable icon.

static SliceAction create(RemoteCallback action, IconCompat actionIcon, int imageMode, CharSequence actionTitle)

Construct a SliceAction representing a tappable icon.

static SliceAction createDeeplink(RemoteCallback action, IconCompat actionIcon, int imageMode, CharSequence actionTitle)

Construct a SliceAction representing a tappable icon that launches an activity when clicked.

static SliceAction createDeeplink(PendingIntent action, IconCompat actionIcon, int imageMode, CharSequence actionTitle)

Construct a SliceAction representing a tappable icon that launches an activity when clicked.

static SliceAction createToggle(RemoteCallback action, IconCompat actionIcon, CharSequence actionTitle, boolean isChecked)

Construct a SliceAction representing a custom toggle icon.

static SliceAction createToggle(RemoteCallback action, CharSequence actionTitle, boolean isChecked)

Construct a SliceAction representing a default toggle.

static SliceAction createToggle(PendingIntent action, IconCompat actionIcon, CharSequence actionTitle, boolean isChecked)

Construct a SliceAction representing a custom toggle icon.

static SliceAction createToggle(PendingIntent action, CharSequence actionTitle, boolean isChecked)

Construct a SliceAction representing a default toggle.

PendingIntent getAction()
CharSequence getContentDescription()
IconCompat getIcon()
int getImageMode()
int getPriority()
CharSequence getTitle()
boolean isActivity()
boolean isChecked()
boolean isDefaultToggle()
boolean isToggle()
SliceAction setChecked(boolean isChecked)
SliceAction setContentDescription(CharSequence description)
SliceAction setPriority(int priority)

Sets the priority of this action, with the lowest priority having the highest ranking.

Inherited methods