package com.gingersoft.gsa.other_order_mode.ui.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.gingersoft.gsa.other_order_mode.R
import com.qmuiteam.qmui.alpha.QMUIAlphaTextView

class TextAdapter(list: List<String>) : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_textview, list) {
    override fun convert(helper: BaseViewHolder?, item: String?) {
        helper?.setText(R.id.tv_item, item)
        helper?.getView<TextView>(R.id.tv_item)!!.setOnClickListener {
            if (onItemClickListener != null) {
                onItemClickListener.onItemClick(this, it, helper.adapterPosition)
            }
        }
    }
}