package com.dahe.gldriver.ui.waybill.fragment

import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.dahe.gldriver.adapter.WaybillListAdapter
import com.dahe.gldriver.databinding.FragmentWaybillBinding
import com.dahe.gldriver.databinding.FragmentWaybillListBinding
import com.dahe.glex.bean.WayBillBean
import com.dahe.mylibrary.base.BaseFragment

/**
 * @ClassName AllWaybillFragment
 * @Author 用户
 * @Date 2024/1/24 14:06
 * @Description TODO
 */
class AllWaybillFragment : BaseFragment<FragmentWaybillListBinding>() {


    override fun onFragmentVisibleChange(isVisible: Boolean) {

    }

    override fun onFragmentFirstVisible() {
        var datas = mutableListOf<WayBillBean>(
            WayBillBean(),
            WayBillBean(),
            WayBillBean(),
            WayBillBean(),
            WayBillBean(),
            WayBillBean(),
            WayBillBean(),
            WayBillBean()
        )
        var adapter = binding.recyclerView.run {
            layoutManager = LinearLayoutManager(mContext,RecyclerView.VERTICAL,false)
            setHasFixedSize(true)
            adapter = WaybillListAdapter()
            adapter as WaybillListAdapter
        }
        adapter.addData(datas)
    }
}