SliceMetrics
open classSliceMetrics
kotlin.Any | |
↳ | android.app.slice.SliceMetrics |
Metrics interface for slices. This is called by SliceView, so Slice developers should not need to reference this class.
Summary
Public constructors | |
---|---|
SliceMetrics(context: Context, uri: Uri) An object to be used throughout the life of a slice to register events. |
Public methods | |
---|---|
open Unit |
To be called whenever the slice becomes invisible to the user. |
open Unit |
To be called whenever the user invokes a discrete action via a slice. |
open Unit |
To be called whenever the slice becomes visible to the user. |
Public constructors
SliceMetrics
SliceMetrics(
context: Context,
uri: Uri)
An object to be used throughout the life of a slice to register events.
Parameters | |
---|---|
context |
Context: This value cannot be null . |
uri |
Uri: This value cannot be null . |
Public methods
logHidden
open funlogHidden(): Unit
Deprecated: Deprecated in Java.
To be called whenever the slice becomes invisible to the user.
logTouch
open funlogTouch(
actionType: Int,
subSlice: Uri
): Unit
Deprecated: Deprecated in Java.
To be called whenever the user invokes a discrete action via a slice.
Use this for discrete events like a tap or the end of a drag, not for a continuous streams of events, such as the motion during a gesture.
Parameters | |
---|---|
actionType |
Int: The type of the event. |
subSlice |
Uri: The URI of the sub-slice that is the subject of the interaction. This value cannot be null . |
See Also
logVisible
open funlogVisible(): Unit
Deprecated: Deprecated in Java.
To be called whenever the slice becomes visible to the user.