package com.abbidot.tracker.adapter

import android.content.Context
import androidx.core.content.ContextCompat
import com.abbidot.baselibrary.list.BaseRecyclerAdapter
import com.abbidot.baselibrary.list.RecyclerViewHolder
import com.abbidot.tracker.R
import com.abbidot.tracker.bean.MenuTxtBean

/**
 *Created  by .yzq on 2022/1/10/010.
 * @link
 * @description:选择地图应用列表弹窗
 */
class SelectMapListDialogAdapter(ctx: Context, list: MutableList<MenuTxtBean>?) :
    BaseRecyclerAdapter<MenuTxtBean>(ctx, list) {

    override fun getEmptyLayoutId(viewType: Int) = 0

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


    override fun bindData(holder: RecyclerViewHolder?, position: Int, item: MenuTxtBean) {
        val textView = holder!!.getTextView(R.id.item_select_map_name)
        textView.text = item.menuName
        textView.setCompoundDrawablesWithIntrinsicBounds(
            item.imageId, 0, 0, 0)
    }
}