RemoteViewsCompat.RemoteCollectionItems

public final 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 methods

final int

Returns the number of elements in the collection.

final long
getItemId(int position)

Returns the id for position.

final @NonNull RemoteViews
getItemView(int position)

Returns the RemoteViews to display at position.

final int

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

final boolean

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

Public methods

getItemCount

Added in 1.0.0
public final int getItemCount()

Returns the number of elements in the collection.

Returns
int

Count of items.

getItemId

Added in 1.0.0
public final long getItemId(int position)

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
public final @NonNull RemoteViews getItemView(int position)

Returns the RemoteViews to display at position.

Returns
@NonNull RemoteViews

RemoteViews for the position.

getViewTypeCount

Added in 1.0.0
public final int getViewTypeCount()

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

hasStableIds

Added in 1.0.0
public final boolean hasStableIds()

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