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 | |
---|---|
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 |
toString() |
Properties | |
---|---|
Int |
Total number of actions available in this row of the slice. |
Int |
If multiple buttons are presented in this |
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: Int
Indicates the event was an interaction with a button positioned at the end of the row, potentially grouped with other buttons.
Value: 1
POSITION_START
static val POSITION_START: Int
Indicates the event was an interaction with a button positioned at the start of the row.
Value: 0
ROW_TYPE_GRID
static val ROW_TYPE_GRID: Int
Indicates the row is represented in a grid template.
Value: 1