Search in sources :

Example 1 with MKRefreshHeader

use of com.ycr.module.base.view.pullrefresh.MKRefreshHeader in project MVP by yuchengren.

the class BaseApplication method initRefreshView.

private void initRefreshView() {
    SmartRefreshLayout.setDefaultRefreshHeaderCreator(new DefaultRefreshHeaderCreator() {

        @NonNull
        @Override
        public RefreshHeader createRefreshHeader(@NonNull Context context, @NonNull RefreshLayout layout) {
            return new MKRefreshHeader(context);
        }
    });
    SmartRefreshLayout.setDefaultRefreshFooterCreator(new DefaultRefreshFooterCreator() {

        @NonNull
        @Override
        public RefreshFooter createRefreshFooter(@NonNull Context context, @NonNull RefreshLayout layout) {
            ClassicsFooter classicsFooter = new ClassicsFooter(context);
            ClassicsFooter.REFRESH_FOOTER_NOTHING = "没有更多数据啦";
            classicsFooter.setTextSizeTitle(14);
            classicsFooter.setAccentColorId(R.color.text_color_medium);
            return classicsFooter;
        }
    });
}
Also used : Context(android.content.Context) MKRefreshHeader(com.ycr.module.base.view.pullrefresh.MKRefreshHeader) RefreshHeader(com.scwang.smartrefresh.layout.api.RefreshHeader) RefreshFooter(com.scwang.smartrefresh.layout.api.RefreshFooter) DefaultRefreshFooterCreator(com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator) DefaultRefreshHeaderCreator(com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator) SmartRefreshLayout(com.scwang.smartrefresh.layout.SmartRefreshLayout) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) NonNull(android.support.annotation.NonNull) MKRefreshHeader(com.ycr.module.base.view.pullrefresh.MKRefreshHeader) ClassicsFooter(com.ycr.lib.ui.pullrefresh.smart.footer.ClassicsFooter)

Aggregations

Context (android.content.Context)1 NonNull (android.support.annotation.NonNull)1 SmartRefreshLayout (com.scwang.smartrefresh.layout.SmartRefreshLayout)1 DefaultRefreshFooterCreator (com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator)1 DefaultRefreshHeaderCreator (com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator)1 RefreshFooter (com.scwang.smartrefresh.layout.api.RefreshFooter)1 RefreshHeader (com.scwang.smartrefresh.layout.api.RefreshHeader)1 RefreshLayout (com.scwang.smartrefresh.layout.api.RefreshLayout)1 ClassicsFooter (com.ycr.lib.ui.pullrefresh.smart.footer.ClassicsFooter)1 MKRefreshHeader (com.ycr.module.base.view.pullrefresh.MKRefreshHeader)1