Added in API level 31

RemoteCollectionItems


class RemoteCollectionItems : Parcelable
kotlin.Any
   ↳ android.widget.RemoteViews.RemoteCollectionItems

Representation of a fixed list of items to be displayed in a RemoteViews collection.

Summary

Nested classes

Builder class for RemoteCollectionItems objects.

Inherited constants
Public methods
Int

Int

Returns the number of elements in the collection.

Long
getItemId(position: Int)

Returns the id for position.

RemoteViews
getItemView(position: Int)

Returns the RemoteViews to display at position.

Int

Returns the view type count for the collection when used in an adapter

Boolean

Indicates whether the item ids are stable across changes to the underlying data.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<RemoteViews.RemoteCollectionItems!>

Public methods

describeContents

Added in API level 31
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

getItemCount

Added in API level 31
fun getItemCount(): Int

Returns the number of elements in the collection.

Return
Int Count of items.

getItemId

Added in API level 31
fun getItemId(position: Int): Long

Returns the id for position. See hasStableIds() for whether this id should be considered meaningful across collection updates.

Return
Long Id for the position.

getItemView

Added in API level 31
fun getItemView(position: Int): RemoteViews

Returns the RemoteViews to display at position.

Return
RemoteViews RemoteViews for the position. This value cannot be null.

getViewTypeCount

Added in API level 31
fun getViewTypeCount(): Int

Returns the view type count for the collection when used in an adapter

Return
Int Count of view types for the collection when used in an adapter.

hasStableIds

Added in API level 31
fun hasStableIds(): Boolean

Indicates whether the item ids are stable across changes to the underlying data.

Return
Boolean True if the same id always refers to the same object.

writeToParcel

Added in API level 31
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: 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

Properties

CREATOR

Added in API level 31
static val CREATOR: Parcelable.Creator<RemoteViews.RemoteCollectionItems!>