AppWidgetEvent
class AppWidgetEvent : Parcelable
kotlin.Any | |
↳ | android.appwidget.AppWidgetEvent |
An immutable class that describes the event data for an app widget interaction event.
Summary
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
Int |
The app widget ID of the widget that generated this event. |
IntArray? |
This returns the set of View IDs of the views which have been clicked during the event time range. |
Instant |
getEnd() Describes the end of the time range that this event contains data for. |
Rect? |
This rect with describes the global coordinates of the widget at the end of the event time range. |
IntArray? |
This returns the set of View IDs of the views which have been scrolled during the event time range. |
Instant |
getStart() Describes the start of the time range that this event contains data for. |
Duration |
Describes the total duration of time during which the widget was visible. |
String |
toString() |
Unit |
writeToParcel(out: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<AppWidgetEvent!> |
Parcelable. |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getAppWidgetId
fun getAppWidgetId(): Int
The app widget ID of the widget that generated this event.
getClickedIds
fun getClickedIds(): IntArray?
This returns the set of View IDs of the views which have been clicked during the event time range. Use android.widget.RemoteViews#setAppWidgetEventTag(int, int)
to set a custom integer tag on a view for reporting clicks. If the tag is set, it will be used here instead of the View ID.
Return | |
---|---|
IntArray? |
This value may be null . |
getEnd
fun getEnd(): Instant
Describes the end of the time range that this event contains data for.
Return | |
---|---|
Instant |
This value cannot be null . |
getPosition
fun getPosition(): Rect?
This rect with describes the global coordinates of the widget at the end of the event time range.
Return | |
---|---|
Rect? |
This value may be null . |
getScrolledIds
fun getScrolledIds(): IntArray?
This returns the set of View IDs of the views which have been scrolled during the event time range. Use android.widget.RemoteViews#setAppWidgetEventTag(int, int)
to set a custom integer tag on a view for reporting scrolls. If the tag is set, it will be used here instead of the View ID.
Return | |
---|---|
IntArray? |
This value may be null . |
getStart
fun getStart(): Instant
Describes the start of the time range that this event contains data for.
Return | |
---|---|
Instant |
This value cannot be null . |
getVisibleDuration
fun getVisibleDuration(): Duration
Describes the total duration of time during which the widget was visible. This may be different than the event time range (between getStart()
and getEnd()
if the widget was hidden and shown multiple times during the event time range.
Return | |
---|---|
Duration |
This value cannot be null . |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
out |
Parcel: This value cannot be null . |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<AppWidgetEvent!>
Parcelable.Creator that instantiates AppWidgetEvent objects