Google 致力于为黑人社区推动种族平等。查看具体举措

EventInfo

@RequiresApi(19) open class EventInfo
kotlin.Any
   ↳ androidx.slice.widget.EventInfo

Represents information associated with a logged event on SliceView.

Summary

Constants
static Int

Indicates the event was an interaction with a button.

static Int

Indicates the event was a tap on the entire row.

static Int

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

static Int

Indicates the event was a selection from a selection row.

static Int

Indicates the event was an interaction with a slider.

static Int

Indicates the event was an interaction with a toggle.

static Int

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

static Int

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

static Int

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

static Int

Indicates the row is represented in a grid template.

static Int

Indicates the row is represented in a list template.

static Int

Indicates the row is represented as a messaging template.

static Int

Indicates the row represents a progress indicator.

static Int

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

static Int

Indicates the slice is represented as a shortcut.

static Int

Indicates the row represents an range input slider.

static Int

Indicates the row represents a toggleable item.

static Int

Indicates the state of a toggle is off.

static Int

Indicates the state of a toggle is on.

Public constructors
<init>(sliceMode: Int, actionType: Int, rowTemplateType: Int, rowIndex: Int)

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

Public methods
open Unit
setPosition(actionPosition: Int, actionIndex: Int, actionCount: Int)

Sets positional information for the event.

open String

Properties
Int

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

Int

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

Int

Position of the button on the template.

Int

The type of action that occurred.

Int

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

Int

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

Int

The display mode of the slice being interacted with.

Int

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

Constants

ACTION_TYPE_BUTTON

static val ACTION_TYPE_BUTTON: Int

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

Value: 1

ACTION_TYPE_CONTENT

static val ACTION_TYPE_CONTENT: Int

Indicates the event was a tap on the entire row.

Value: 3

ACTION_TYPE_SEE_MORE

static val ACTION_TYPE_SEE_MORE: Int

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

Value: 4

ACTION_TYPE_SELECTION

static val ACTION_TYPE_SELECTION: Int

Indicates the event was a selection from a selection row.

Value: 5

ACTION_TYPE_SLIDER

static val ACTION_TYPE_SLIDER: Int

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

Value: 2

ACTION_TYPE_TOGGLE

static val ACTION_TYPE_TOGGLE: Int

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

Value: 0

POSITION_CELL

static val POSITION_CELL: Int

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

Value: 2

POSITION_END

static val POSITION_END: