package com.abbidot.tracker.adapter

import android.content.Context
import com.abbidot.baselibrary.list.BaseRecyclerAdapter
import com.abbidot.baselibrary.list.RecyclerViewHolder
import com.abbidot.tracker.R
import com.abbidot.tracker.bean.MenuTxtBean
import com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView

/**
 *Created  by .yzq on 2022/3/22/022.
 * @link
 * @description:
 */
class HowWorkAdapter(ctx: Context, list: MutableList<MenuTxtBean>?) :
    BaseRecyclerAdapter<MenuTxtBean>(ctx, list) {
    override fun getEmptyLayoutId(viewType: Int) = 0

    override fun getItemLayoutId(viewType: Int) = R.layout.item_qmui_common_item_view

    override fun bindData(holder: RecyclerViewHolder?, position: Int, item: MenuTxtBean) {
        val qMUICommonListItemView =
            holder!!.getView(R.id.tracker_manage_setting_item) as QMUICommonListItemView
        qMUICommonListItemView.detailText = item.menuValue
        qMUICommonListItemView.text = item.menuName
    }
}