RemoteViewsCompat.RemoteCollectionItems

class RemoteViewsCompat.RemoteCollectionItems


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

Summary

Nested types

Builder class for RemoteCollectionItems objects.

Public functions

Long
getItemId(position: Int)

Returns the id for position.

RemoteViews
getItemView(position: Int)

Returns the RemoteViews to display at position.

Boolean

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

Public properties

Int

Returns the number of elements in the collection.

Int

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

Public functions

getItemId

Added in 1.0.0
fun getItemId(position: Int): Long

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

Returns
Long

Id for the position.

getItemView

Added in 1.0.0
fun getItemView(position: Int): RemoteViews

Returns the RemoteViews to display at position.

Returns
RemoteViews

RemoteViews for the position.

hasStableIds

Added in 1.0.0
fun hasStableIds(): Boolean

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

Returns
Boolean

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

See also
hasStableIds

Public properties

itemCount

Added in 1.0.0
val itemCountInt

Returns the number of elements in the collection.

Returns
Int

Count of items.

viewTypeCount

Added in 1.0.0
val viewTypeCountInt

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

Returns
Int

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

See also
getViewTypeCount