SliceAction

public interface SliceAction

androidx.slice.core.SliceAction


Interface for a slice action, supports tappable icons, custom toggle icons, and default toggles.

Summary

Public methods

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

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

Public methods

getAction

public abstract PendingIntent getAction ()

Returns
PendingIntent the PendingIntent associated with this action.

getContentDescription

public abstract CharSequence getContentDescription ()

Returns
CharSequence the content description to use for this action.

getIcon

public abstract IconCompat getIcon ()

Returns
IconCompat the IconCompat to display for this action. This can be null when the action represented is a default toggle.

getImageMode

public abstract int getImageMode ()

Returns
int the image mode to use for this action.