Skip to content

IFooterView_en

Zone edited this page Jan 18, 2017 · 1 revision

interface

public interface IFooterView {
    /**
     * change header Global Configuration
     * Main object is to copy the head, copy to copy the properties
     * Note: returns null, the default is the LoadFooter
     */
    IFooterView clone_();
    /**
     * Get footer layout
     * @param zRefreshLayout
     * @return
     */
    View getView(ZRefreshLayout zRefreshLayout);

    /**
     * loadMoreIng
     * @param footerHeight
     */
    void onStart(float footerHeight);
    /**
     * loadMore is complete
     */
    void onComplete();
}

For example:

public class MeterialFooter implements IFooterView {
    private MeterialCircle mMeterialCircle;
    private View rootView;

    @Override
    public View getView(ZRefreshLayout zRefreshLayout) {
        rootView = View.inflate(zRefreshLayout.getContext(), R.layout.header_meterial, null);
        LinearLayout ll_main = (LinearLayout) rootView.findViewById(R.id.ll_main);
        int[] screenPixs = ScreenUtils.getScreenPix((Activity) zRefreshLayout.getContext());
        ll_main.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
                , (int) (screenPixs[1] * 0.1)));
        mMeterialCircle=new MeterialCircle(ll_main,(int) (screenPixs[1] * 0.08));
        rootView.setVisibility(View.INVISIBLE);
        return rootView;
    }

    @Override
    public void onStart(float footerHeight) {
        rootView.setVisibility(View.VISIBLE);
        mMeterialCircle.start();
    }

    @Override
    public void onComplete() {
        rootView.setVisibility(View.INVISIBLE);
        mMeterialCircle.stop();

    }
    @Override
    public IFooterView clone_() {
        MeterialFooter clone =new MeterialFooter();
        return clone;
    }
}

文档

[Home/总览概要] en/cn

[AutoRefresh]en/cn

[AnimateBack]en/cn

[GlobalConfiguration]en/cn

[IFooterView]en/cn

[IHeaderView]en/cn

[IResistance]en/cn

[Update Logs]en/cn

Clone this wiki locally