AdapterMulti
open class AdapterMulti : RecyclerView.Adapter<LeanbackListPreferenceDialogFragment.ViewHolder!>, LeanbackListPreferenceDialogFragment.ViewHolder.OnItemClickListener
Adapter for multiple choices.
Summary
Inherited functions |
From class Adapter
Unit |
bindViewHolder(@NonNull holder: VH, position: Int)
This method internally calls onBindViewHolder(ViewHolder, int) to update the ViewHolder contents with the item at the given position and also sets up some private fields to be used by RecyclerView. Adapters that merge other adapters should use bindViewHolder(ViewHolder, int) when calling nested adapters so that RecyclerView can track which adapter bound the ViewHolder to return the correct position from ViewHolder#getBindingAdapterPosition() method. They should also override the findRelativeAdapterPositionIn(Adapter, ViewHolder, int) method.
|
VH |
createViewHolder(@NonNull parent: ViewGroup, viewType: Int)
This method calls onCreateViewHolder(ViewGroup, int) to create a new ViewHolder and initializes some private fields to be used by RecyclerView.
|
Int |
findRelativeAdapterPositionIn(@NonNull adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder!>, @NonNull viewHolder: RecyclerView.ViewHolder, localPosition: Int)
Returns the position of the given ViewHolder in the given Adapter . If the given Adapter is not part of this Adapter , RecyclerView#NO_POSITION is returned.
|
Long |
getItemId(position: Int)
Return the stable ID for the item at position . If hasStableIds() would return false this method should return NO_ID . The default implementation of this method returns NO_ID .
|
Int |
getItemViewType(position: Int)
Return the view type of the item at position for the purposes of view recycling.
The default implementation of this method returns 0, making the assumption of a single view type for the adapter. Unlike ListView adapters, types need not be contiguous. Consider using id resources to uniquely identify item view types.
|
RecyclerView.Adapter.StateRestorationPolicy |
getStateRestorationPolicy()
Returns when this Adapter wants to restore the state.
|
|