Item - Model that represents a data structure of the adapter's data set.public interface DataSetAdapter<Item> extends DataSet<Item>
NO_ID, NO_POSITION| Modifier and Type | Method and Description |
|---|---|
boolean |
hasStableIds()
Returns a boolean flag indicating whether the data set of this adapter has stable ids or not.
|
boolean |
isEnabled(int position)
Returns a boolean flag indicating whether an item at the specified position is
enabled or not.
|
void |
restoreInstanceState(Parcelable savedState)
Restores the previous state, saved via
saveInstanceState(), of this adapter. |
Parcelable |
saveInstanceState()
Saves the current state of this adapter.
|
getItem, getItemCount, getItemId, hasItemAt, isEmpty, registerOnDataChangeListener, registerOnDataSetActionListener, registerOnDataSetListener, unregisterOnDataChangeListener, unregisterOnDataSetActionListener, unregisterOnDataSetListenerboolean isEnabled(int position)
position - The position of item to check.True if the item is enabled, false otherwise.boolean hasStableIds()
True if the data set has stable ids so each position has its unique id,
false otherwise.DataSet.getItemId(int)@NonNull Parcelable saveInstanceState()
If you decide to override this method, do not forget to call super.saveInstanceState()
and pass the obtained super state to the corresponding constructor of your saved state
implementation to ensure the state of all classes along the chain is properly saved.
void restoreInstanceState(@NonNull Parcelable savedState)
saveInstanceState(), of this adapter.
If you decide to override this method, do not forget to call super.restoreInstanceState(Parcelable)
and pass there the parent state obtained from your saved state implementation to ensure the
state of all classes along the chain is properly restored.
savedState - Should be the same state as obtained via saveInstanceState() before.