package com.unis.sxzcl.widget;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.chad.library.adapter.base.loadmore.BaseLoadMoreView;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.unis.sxzcl.R;

import org.jetbrains.annotations.NotNull;

/**
 *
 * 包名: com.cargocenter.app.widget
 * 类名: MyLoadMoreView
 * 作用描述:
 * 创建人: mQ
 * 创建时间: 2020/9/20 22:09
 * 更新人:
 * 更新时间: 2020/9/20 22:09
 * 更新说明:
 * 版本号: 1.0
 */
public class MyLoadMoreView extends BaseLoadMoreView {
    @NotNull
    @Override
    public View getLoadComplete(@NotNull BaseViewHolder baseViewHolder) {
        return baseViewHolder.findView(R.id.layout_complete);
    }

    @NotNull
    @Override
    public View getLoadEndView(@NotNull BaseViewHolder baseViewHolder) {
        return baseViewHolder.findView(R.id.layout_end);
    }

    @NotNull
    @Override
    public View getLoadFailView(@NotNull BaseViewHolder baseViewHolder) {
        return baseViewHolder.findView(R.id.layout_fail);
    }

    @NotNull
    @Override
    public View getLoadingView(@NotNull BaseViewHolder baseViewHolder) {
        return baseViewHolder.findView(R.id.layout_loading);
    }

    @NotNull
    @Override
    public View getRootView(@NotNull ViewGroup viewGroup) {
        return LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.list_more_layout,
                viewGroup,
                false);
    }
}
