package com.zxhl.cms.pay

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView

import com.zxhl.cms.R
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.chat.RecordEntity

class PayRecordAdapter : BaseRecyclerAdapter<RecordEntity, PayRecordAdapter.ViewHolder> {
    private var mContext: Context? = null

    constructor(
        content: Context?
    ) : super() {
        mContext = content
    }

    override fun onCreateViewHolder(holder: ViewGroup, p1: Int): ViewHolder {


        return ViewHolder(
            LayoutInflater.from(holder.context)
                .inflate(R.layout.item_layout_member_record, holder, false)
        )
    }

    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
        val data = mList[position]
        holder.id_tv_title.text=data.desc
        holder.id_tv_time.text=data.payTime
        holder.id_tv_day_member.text="+"+data.desc
    }

    inner class ViewHolder : RecyclerView.ViewHolder {


        var id_tv_title: TextView
        var id_tv_time: TextView
        var id_tv_day_member: TextView

        constructor(itemView: View) : super(itemView) {
            id_tv_title = itemView.findViewById(R.id.id_tv_title)
            id_tv_time = itemView.findViewById(R.id.id_tv_time)
            id_tv_day_member = itemView.findViewById(R.id.id_tv_day_member)

        }
    }
}