abstract class BaseAdapter : Adapter<BaseViewHolder>, LifecycleObserver
BaseAdapter is an abstract class for structuring the base adapter class.
BaseAdapter()
BaseAdapter is an abstract class for structuring the base adapter class. |
fun <T> addItemListOnSection(section: Int, items: List<T>): Unit
adds an item list on the section. |
|
fun addItemOnSection(section: Int, item: Any): Unit
adds an item on the section. |
|
fun <T> addSection(section: List<T>): Unit
adds a section on the section list. |
|
fun <T> addSectionList(sections: List<List<T>>): Unit
adds a section list on the section list. |
|
fun clearAllSections(): Unit
clears all sections. |
|
fun clearSection(section: Int): Unit
clears a section. |
|
open fun getItemCount(): Int
gets all item counts on the sections. |
|
open fun getItemViewType(position: Int): Int |
|
fun <T> insertSection(row: Int, section: List<T>): Unit
inserts an section on the section list. |
|
abstract fun layout(sectionRow: SectionRow): Int
returns layout resources by section rows. |
|
fun objectFromPosition(position: Int): Any |
|
fun objectFromSectionRow(sectionRow: SectionRow): Any |
|
open fun onBindViewHolder(viewHolder: BaseViewHolder, position: Int): Unit |
|
open fun onCreateViewHolder(viewGroup: ViewGroup, layout: Int): BaseViewHolder |
|
fun onDestroyed(): Unit |
|
open fun onViewAttachedToWindow(holder: BaseViewHolder): Unit |
|
open fun onViewDetachedFromWindow(holder: BaseViewHolder): Unit |
|
fun removeItemOnSection(section: Int, item: Any): Unit
removes an item on the section. |
|
fun <T> removeSection(section: Int): Unit
removes a section on the section list. |
|
fun <T> reverseSection(section: Int): Unit
reverses item list on the section. |
|
fun sectionCount(section: Int): Int
gets section count. |
|
fun <T> sectionItems(section: Int): MutableList<Any>
gets mutable an item list on the sections. |
|
fun sections(): MutableList<MutableList<Any>>
gets mutable section list. |
|
abstract fun viewHolder(layout: Int, view: View): BaseViewHolder
returns RecyclerView.ViewHolder by layouts. |