vnorderui / com.venuenext.vnorderui.stands / MenuAdapter

MenuAdapter

class MenuAdapter : Adapter<VNViewHolder>, MenuItemDelegate

Constructors

<init>

MenuAdapter(context: Context, viewModel: MenuViewModel, standsViewModel: StandsViewModel, delegate: MenuDelegate, layoutManager: LinearLayoutManager, adapterListener: MenuAdapterListener)

Properties

adapterListener

var adapterListener: MenuAdapterListener

context

val context: Context

delegate

var delegate: MenuDelegate

hasCheckedSeat

var hasCheckedSeat: Boolean

layoutManager

var layoutManager: LinearLayoutManager

recyclerViewItems

var recyclerViewItems: List<Any>?

sectionMap

var sectionMap: MutableMap<String, Int>

standsViewModel

val standsViewModel: StandsViewModel

viewModel

val viewModel: MenuViewModel

Functions

enableMenuItemTap

fun enableMenuItemTap(): Unit

getItemCount

fun getItemCount(): Int

getItemViewType

fun getItemViewType(position: Int): Int

listen

fun <T : ViewHolder> T.listen(event: (position: Int, type: Int) -> Unit): T

onBindViewHolder

fun onBindViewHolder(holder: VNViewHolder, position: Int): Unit

onCreateViewHolder

fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VNViewHolder

onMenuItemTapped

fun onMenuItemTapped(position: Int): Unit

onViewDetachedFromWindow

fun onViewDetachedFromWindow(holder: VNViewHolder): Unit