EventInfo

public class EventInfo
extends Object

java.lang.Object
   ↳ androidx.slice.widget.EventInfo


Represents information associated with a logged event on SliceView.

Summary

Constants

int ACTION_TYPE_BUTTON

Indicates the event was an interaction with a button.

int ACTION_TYPE_CONTENT

Indicates the event was a tap on the entire row.

int ACTION_TYPE_SEE_MORE

Indicates the event was a tap on a see more button.

int ACTION_TYPE_SELECTION

Indicates the event was a selection from a selection row.

int ACTION_TYPE_SLIDER

Indicates the event was an interaction with a slider.

int ACTION_TYPE_TOGGLE

Indicates the event was an interaction with a toggle.

int POSITION_CELL

Indicates the event was an interaction with a button positioned in a grid cell.

int POSITION_END

Indicates the event was an interaction with a button positioned at the end of the row, potentially grouped with other buttons.

int POSITION_START

Indicates the event was an interaction with a button positioned at the start of the row.

int ROW_TYPE_GRID

Indicates the row is represented in a grid template.

int ROW_TYPE_LIST

Indicates the row is represented in a list template.

int ROW_TYPE_MESSAGING

Indicates the row is represented as a messaging template.

int ROW_TYPE_PROGRESS

Indicates the row represents a progress indicator.

int ROW_TYPE_SELECTION

Indicates the row represents a selection (drop-down list).

int ROW_TYPE_SHORTCUT

Indicates the slice is represented as a shortcut.

int ROW_TYPE_SLIDER

Indicates the row represents an range input slider.

int ROW_TYPE_TOGGLE

Indicates the row represents a toggleable item.

int STATE_OFF

Indicates the state of a toggle is off.

int STATE_ON

Indicates the state of a toggle is on.

Fields

public int actionCount

Total number of actions available in this row of the slice.

public int actionIndex

If multiple buttons are presented in this actionPosition on the row, then this is the index of that button that was interacted with.

public int actionPosition

Position of the button on the template.

public int actionType

The type of action that occurred.

public int rowIndex

Index of the row that was interacted with in the slice.

public int rowTemplateType

The template type of the row that was interacted with in the slice.

public int sliceMode

The display mode of the slice being interacted with.

public int state

Represents the state after the event or -1 if not applicable for the event type.

Public constructors

EventInfo(int sliceMode, int actionType, int rowTemplateType, int rowIndex)

Constructs an event info object with the required information for an event.

Public methods

void setPosition(int actionPosition, int actionIndex, int actionCount)

Sets positional information for the event.

String toString()

Inherited methods

Constants

ACTION_TYPE_BUTTON

public static final int ACTION_TYPE_BUTTON

Indicates the event was an interaction with a button. Check actionPosition to see where on the card the button is placed.

Constant Value: 1 (0x00000001)

ACTION_TYPE_CONTENT

public static final int ACTION_TYPE_CONTENT

Indicates the event was a tap on the entire row.

Constant Value: 3 (0x00000003)

ACTION_TYPE_SEE_MORE

public static final int ACTION_TYPE_SEE_MORE

Indicates the event was a tap on a see more button.

Constant Value: 4 (0x00000004)

ACTION_TYPE_SELECTION

public static final int ACTION_TYPE_SELECTION

Indicates the event was a selection from a selection row.

Constant Value: 5 (0x00000005)

ACTION_TYPE_SLIDER

public static final int ACTION_TYPE_SLIDER

Indicates the event was an interaction with a slider. Check state to see the new state of the slider.

Constant Value: 2 (0x00000002)

ACTION_TYPE_TOGGLE

public static final int ACTION_TYPE_TOGGLE

Indicates the event was an interaction with a toggle. Check state to see the new state of the toggle.

Constant Value: 0 (0x00000000)

POSITION_CELL