# Print output for @column tags ?>
public
class
SliceMetrics
extends Object
java.lang.Object | |
↳ | android.app.slice.SliceMetrics |
Metrics interface for slices. This is called by SliceView, so Slice developers should not need to reference this class.
See also:
Public constructors | |
---|---|
SliceMetrics(Context context, Uri uri)
An object to be used throughout the life of a slice to register events. |
Public methods | |
---|---|
void
|
logHidden()
To be called whenever the slice becomes invisible to the user. |
void
|
logTouch(int actionType, Uri subSlice)
To be called whenever the user invokes a discrete action via a slice. |
void
|
logVisible()
To be called whenever the slice becomes visible to the user. |
Inherited methods | |
---|---|
public 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 void logHidden ()
To be called whenever the slice becomes invisible to the user.
public void logTouch (int actionType, Uri subSlice)
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:
public void logVisible ()
To be called whenever the slice becomes visible to the user.