// Path: library/src/main/java/com/dreamliner/loadmore/LoadMoreContainer.java
// public interface LoadMoreContainer {
// 
//     public void setShowLoadingForFirstPage(boolean showLoading);
// 
//     public void setAutoLoadMore(boolean autoLoadMore);
// 
//     public void setLoadMoreView(View view);
// 
//     public void setLoadMoreUIHandler(LoadMoreUIHandler handler);
// 
//     public void setLoadMoreHandler(LoadMoreHandler handler);
// 
//     /**
//      * When data has loaded
//      *
//      * @param emptyResult
//      * @param hasMore
//      */
//     public void loadMoreFinish(boolean emptyResult, boolean hasMore);
// 
//     /**
//      * When something unexpected happened while loading the data
//      *
//      * @param errorCode
//      * @param errorMessage
//      */
//     public void loadMoreError(int errorCode, String errorMessage);
// }
// 
// Path: library/src/main/java/com/dreamliner/loadmore/LoadMoreUIHandler.java
// public interface LoadMoreUIHandler {
// 
//     public void onLoading(LoadMoreContainer container);
// 
//     public void onLoadFinish(LoadMoreContainer container, boolean empty, boolean hasMore);
// 
//     public void onWaitToLoadMore(LoadMoreContainer container);
// 
//     public void onLoadError(LoadMoreContainer container, int errorCode, String errorMessage);
// }


import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dreamliner.lib.rvhelper.sample.R;
import com.dreamliner.loadingdrawable.LoadingView;
import com.dreamliner.loadmore.LoadMoreContainer;
import com.dreamliner.loadmore.LoadMoreUIHandler;
import androidx.annotation.StringRes;
package com.dreamliner.lib.rvhelper.sample.view;




/**
 * @author chenzj
 * @Title: DlLoadmoreView
 * @Description: 类的描述 -
 * @date 2016/10/9 22:18
 * @email admin@chenzhongjin.cn
 */
public class DlLoadmoreView extends RelativeLayout implements LoadMoreUIHandler {

    private LoadingView mLoadingView;
    private TextView mFooterTv;

    public DlLoadmoreView(Context context) {
        this(context, null);
    }

    public DlLoadmoreView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public DlLoadmoreView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        setupViews();
    }

    private void setupViews() {
        LayoutInflater.from(getContext()).inflate(R.layout.layout_dl_footerview, this);
        mLoadingView = (LoadingView) findViewById(R.id.footer_indicatorview);
        mFooterTv = (TextView) findViewById(R.id.footer_tv);
    }

    @Override
// Path: library/src/main/java/com/dreamliner/loadmore/LoadMoreContainer.java
// public interface LoadMoreContainer {
// 
//     public void setShowLoadingForFirstPage(boolean showLoading);
// 
//     public void setAutoLoadMore(boolean autoLoadMore);
// 
//     public void setLoadMoreView(View view);
// 
//     public void setLoadMoreUIHandler(LoadMoreUIHandler handler);
// 
//     public void setLoadMoreHandler(LoadMoreHandler handler);
// 
//     /**
//      * When data has loaded
//      *
//      * @param emptyResult
//      * @param hasMore
//      */
//     public void loadMoreFinish(boolean emptyResult, boolean hasMore);
// 
//     /**
//      * When something unexpected happened while loading the data
//      *
//      * @param errorCode
//      * @param errorMessage
//      */
//     public void loadMoreError(int errorCode, String errorMessage);
// }
// 
// Path: library/src/main/java/com/dreamliner/loadmore/LoadMoreUIHandler.java
// public interface LoadMoreUIHandler {
// 
//     public void onLoading(LoadMoreContainer container);
// 
//     public void onLoadFinish(LoadMoreContainer container, boolean empty, boolean hasMore);
// 
//     public void onWaitToLoadMore(LoadMoreContainer container);
// 
//     public void onLoadError(LoadMoreContainer container, int errorCode, String errorMessage);
// }


// Path: demo/src/main/java/com/dreamliner/lib/rvhelper/sample/view/DlLoadmoreView.java
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dreamliner.lib.rvhelper.sample.R;
import com.dreamliner.loadingdrawable.LoadingView;
import com.dreamliner.loadmore.LoadMoreContainer;
import com.dreamliner.loadmore.LoadMoreUIHandler;
import androidx.annotation.StringRes;

package com.dreamliner.lib.rvhelper.sample.view;




/**
 * @author chenzj
 * @Title: DlLoadmoreView
 * @Description: 类的描述 -
 * @date 2016/10/9 22:18
 * @email admin@chenzhongjin.cn
 */
public class DlLoadmoreView extends RelativeLayout implements LoadMoreUIHandler {

    private LoadingView mLoadingView;
    private TextView mFooterTv;

    public DlLoadmoreView(Context context) {
        this(context, null);
    }

    public DlLoadmoreView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public DlLoadmoreView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        setupViews();
    }

    private void setupViews() {
        LayoutInflater.from(getContext()).inflate(R.layout.layout_dl_footerview, this);
        mLoadingView = (LoadingView) findViewById(R.id.footer_indicatorview);
        mFooterTv = (TextView) findViewById(R.id.footer_tv);
    }

    @Override
    public void onLoading(LoadMoreContainer container) {