addAdapter
open fun addAdapter(@NonNull adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>): Boolean(source)
Appends the given adapter to the existing list of adapters and notifies the observers of this ConcatAdapter.
Return
true
if the adapter is successfully added because it did not already exist, false
otherwise.
Parameters
adapter
The new adapter to add
See also
open fun addAdapter(index: Int, @NonNull adapter: RecyclerView.Adapter<out RecyclerView.ViewHolder>): Boolean(source)
Adds the given adapter to the given index among other adapters that are already added.
Return
true
if the adapter is successfully added because it did not already exist, false
otherwise.
Parameters
index
The index into which to insert the adapter. ConcatAdapter will throw an IndexOutOfBoundsException if the index is not between 0 and current adapter count (inclusive).
adapter
The new adapter to add to the adapters list.