Search in sources :

Example 6 with RefreshFooter

use of com.scwang.smartrefresh.layout.api.RefreshFooter 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

RefreshFooter (com.scwang.smartrefresh.layout.api.RefreshFooter)6 RefreshHeader (com.scwang.smartrefresh.layout.api.RefreshHeader)4 RefreshLayout (com.scwang.smartrefresh.layout.api.RefreshLayout)3 Animator (android.animation.Animator)2 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)2 ValueAnimator (android.animation.ValueAnimator)2 Context (android.content.Context)2 NonNull (android.support.annotation.NonNull)2 View (android.view.View)2 TextView (android.widget.TextView)2 SmartRefreshLayout (com.scwang.smartrefresh.layout.SmartRefreshLayout)2 DefaultRefreshFooterCreator (com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator)2 DefaultRefreshHeaderCreator (com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator)2 AnimatorUpdateListener (android.animation.ValueAnimator.AnimatorUpdateListener)1 SuppressLint (android.annotation.SuppressLint)1 Paint (android.graphics.Paint)1 Toolbar (android.support.v7.widget.Toolbar)1 RefreshInternal (com.scwang.smartrefresh.layout.api.RefreshInternal)1 RefreshState (com.scwang.smartrefresh.layout.constant.RefreshState)1 ClassicsFooter (com.scwang.smartrefresh.layout.footer.ClassicsFooter)1