PanelListAdapter

open class PanelListAdapter<P : Panel>(val subContainerManager: PanelListSubContainerManager) : RecyclerView.Adapter<RecyclerView.ViewHolder>

An adapter for showing a list of panels in a RecyclerView.

System UI specific details for individual panels can be injected through subContainerManager or by extending this class.

Constructors

Link copied to clipboard
fun PanelListAdapter(subContainerManager: PanelListSubContainerManager)

Types

Link copied to clipboard
class PanelListViewHolder<P : Panel>(val subContainerView: ViewGroup) : RecyclerView.ViewHolder

A ViewHolder to represent a list item showing a panel.

Link copied to clipboard
interface PanelManager<P : Panel>

A manager allowing the adapter to add and remove panels.

Properties

Link copied to clipboard
var panels: List<P>

The panels to display in the list.

Link copied to clipboard
open val subContainerManager: PanelListSubContainerManager

Functions

Link copied to clipboard
open override fun getItemCount(): Int
Link copied to clipboard
open override fun getItemViewType(position: Int): Int
Link copied to clipboard
fun initialize(panelManager: PanelListAdapter.PanelManager<P>, subContainerIdsAndPanelsToRestore: LinkedHashMap<Int, P>?)

Initializes the adapter, allowing it to be used by a RecyclerView. This must be called before other state is provided, such as through updatePanels.

Link copied to clipboard
@CallSuper
open override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int)
Link copied to clipboard
open override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder
Link copied to clipboard
@CallSuper
open override fun onViewAttachedToWindow(holder: RecyclerView.ViewHolder)
Link copied to clipboard
@CallSuper
open override fun onViewDetachedFromWindow(holder: RecyclerView.ViewHolder)
Link copied to clipboard
fun updatePanels(panels: List<P>)

Updates the panels presented by this adapter. The update may be posted instead of being processed synchronously.

Inherited functions

Link copied to clipboard
fun bindViewHolder(@NonNull p0: RecyclerView.ViewHolder, p1: Int)
Link copied to clipboard
@NonNull
fun createViewHolder(@NonNull p0: ViewGroup, p1: Int): RecyclerView.ViewHolder
Link copied to clipboard
open fun findRelativeAdapterPositionIn(    @NonNull p0: RecyclerView.Adapter<out RecyclerView.ViewHolder>,     @NonNull p1: RecyclerView.ViewHolder,     p2: Int): Int
Link copied to clipboard
open fun getItemId(p0: Int): Long
Link copied to clipboard
@NonNull
fun getStateRestorationPolicy(): RecyclerView.Adapter.StateRestorationPolicy
Link copied to clipboard
fun hasObservers(): Boolean
Link copied to clipboard
fun hasStableIds(): Boolean
Link copied to clipboard
fun notifyDataSetChanged()
Link copied to clipboard
fun notifyItemChanged(p0: Int)
fun notifyItemChanged(p0: Int, @Nullable p1: Any?)
Link copied to clipboard
fun notifyItemInserted(p0: Int)
Link copied to clipboard
fun notifyItemMoved(p0: Int, p1: Int)
Link copied to clipboard
fun notifyItemRangeChanged(p0: Int, p1: Int)
fun notifyItemRangeChanged(    p0: Int,     p1: Int,     @Nullable p2: Any?)
Link copied to clipboard
fun notifyItemRangeInserted(p0: Int, p1: Int)
Link copied to clipboard
fun notifyItemRangeRemoved(p0: Int, p1: Int)
Link copied to clipboard
fun notifyItemRemoved(p0: Int)
Link copied to clipboard
open fun onAttachedToRecyclerView(@NonNull p0: RecyclerView)
Link copied to clipboard
open fun onBindViewHolder(    @NonNull p0: RecyclerView.ViewHolder,     p1: Int,     @NonNull p2: MutableList<Any>)
Link copied to clipboard
open fun onDetachedFromRecyclerView(@NonNull p0: RecyclerView)
Link copied to clipboard
open fun onFailedToRecycleView(@NonNull p0: RecyclerView.ViewHolder): Boolean
Link copied to clipboard
open fun onViewRecycled(@NonNull p0: RecyclerView.ViewHolder)
Link copied to clipboard
open fun registerAdapterDataObserver(@NonNull p0: RecyclerView.AdapterDataObserver)
Link copied to clipboard
open fun setHasStableIds(p0: Boolean)
Link copied to clipboard
open fun setStateRestorationPolicy(@NonNull p0: RecyclerView.Adapter.StateRestorationPolicy)
Link copied to clipboard
open fun unregisterAdapterDataObserver(@NonNull p0: RecyclerView.AdapterDataObserver)

Inheritors

Link copied to clipboard