package com.zxbw.modulemain.adapter

import android.app.Activity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter

class FlashSaleAdapter : BaseRecyclerAdapter<Any, FlashSaleAdapter.ViewHolder> {
    private var mContext: Activity? = null

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

    override fun onBindViewHolder(holder: ViewHolder, position: Int) {

        holder.id_ll_item?.setOnClickListener {

        }
    }

    override fun getItemCount(): Int {
        return 3
    }

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
        return ViewHolder(
            LayoutInflater.from(AppContext.get())
                .inflate(R.layout.item_layout_sale_flash_top, parent, false)
        )
    }

    class ViewHolder : RecyclerView.ViewHolder {
        var id_ll_item: LinearLayout?


        constructor(
            itemView: View
        ) : super(itemView) {
            id_ll_item =
                itemView.findViewById<LinearLayout>(R.id.id_ll_item)

        }
    }
}