Search in sources :

Example 6 with SimpleMultiPurposeListener

use of com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener in project SmartRefreshLayout by scwang90.

the class FlyRefreshStyleActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_fly_refresh);
    final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            finish();
        }
    });
    /*-----------------------------------------------------------
         * 关键代码-开始
         *----------------------------------------------------------*/
    MountainSceneView mSceneView = (MountainSceneView) findViewById(R.id.mountain);
    mFlyView = (FlyView) findViewById(R.id.flyView);
    mFlyRefreshHeader = (FlyRefreshHeader) findViewById(R.id.flyRefresh);
    // 绑定场景和纸飞机
    mFlyRefreshHeader.setUp(mSceneView, mFlyView);
    mRefreshLayout = (RefreshLayout) findViewById(R.id.refreshLayout);
    // 设置回弹插值器,会带有弹簧震动效果
    mRefreshLayout.setReboundInterpolator(new ElasticOutInterpolator());
    // 设置回弹动画时长
    mRefreshLayout.setReboundDuration(800);
    mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {

        @Override
        public void onRefresh(@NonNull RefreshLayout refreshLayout) {
            View child = mListView.getChildAt(0);
            if (child != null) {
                // 开始刷新的时候个第一个item设置动画效果
                bounceAnimateView(child.findViewById(R.id.icon));
            }
            // 改变主题颜色
            updateTheme();
            mRefreshLayout.getLayout().postDelayed(new Runnable() {

                @Override
                public void run() {
                    // 通知刷新完成,这里改为通知Header,让纸飞机飞回来
                    mFlyRefreshHeader.finishRefresh(new AnimatorListenerAdapter() {

                        public void onAnimationEnd(Animator animation) {
                            // 在纸飞机回到原位之后添加数据效果更真实
                            addItemData();
                        }
                    });
                }
            }, // 模拟两秒的后台数据加载
            2000);
        }
    });
    // 设置 让 AppBarLayout 和 RefreshLayout 的滚动同步 并不保持 toolbar 位置不变
    final AppBarLayout appBar = (AppBarLayout) findViewById(R.id.appbar);
    mRefreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {

        @Override
        public void onHeaderMoving(RefreshHeader header, boolean isDragging, float percent, int offset, int headerHeight, int maxDragHeight) {
            appBar.setTranslationY(offset);
            toolbar.setTranslationY(-offset);
        }
    });
    if (isFirstEnter) {
        isFirstEnter = false;
        // 第一次进入触发自动刷新,演示效果
        mRefreshLayout.autoRefresh();
    }
    /*
         * 初始化列表数据
         */
    initDataSet();
    mAdapter = new ItemAdapter(this);
    mLayoutManager = new LinearLayoutManager(this);
    mListView = (RecyclerView) findViewById(R.id.recyclerView);
    mListView.setLayoutManager(mLayoutManager);
    mListView.setAdapter(mAdapter);
    mListView.setItemAnimator(new SampleItemAnimator());
    mToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbarLayout);
    mActionButton = (FloatingActionButton) findViewById(R.id.fab);
    /*
         * 设置点击 ActionButton 时候触发自动刷新 并改变主题颜色
         */
    mActionButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            updateTheme();
            mRefreshLayout.autoRefresh();
        }
    });
    /*
         * 监听 AppBarLayout 的关闭和开启 给 FlyView(纸飞机) 和 ActionButton 设置关闭隐藏动画
         */
    appBar.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {

        boolean misAppbarExpand = true;

        @Override
        public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
            int scrollRange = appBarLayout.getTotalScrollRange();
            float fraction = 1f * (scrollRange + verticalOffset) / scrollRange;
            if (fraction < 0.1 && misAppbarExpand) {
                misAppbarExpand = false;
                mActionButton.animate().scaleX(0).scaleY(0);
                mFlyView.animate().scaleX(0).scaleY(0);
                ValueAnimator animator = ValueAnimator.ofInt(mListView.getPaddingTop(), 0);
                animator.setDuration(300);
                animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

                    @Override
                    public void onAnimationUpdate(ValueAnimator animation) {
                        mListView.setPadding(0, (int) animation.getAnimatedValue(), 0, 0);
                    }
                });
                animator.start();
            }
            if (fraction > 0.8 && !misAppbarExpand) {
                misAppbarExpand = true;
                mActionButton.animate().scaleX(1).scaleY(1);
                mFlyView.animate().scaleX(1).scaleY(1);
                ValueAnimator animator = ValueAnimator.ofInt(mListView.getPaddingTop(), DensityUtil.dp2px(25));
                animator.setDuration(300);
                animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

                    @Override
                    public void onAnimationUpdate(ValueAnimator animation) {
                        mListView.setPadding(0, (int) animation.getAnimatedValue(), 0, 0);
                    }
                });
                animator.start();
            }
        }
    });
    // 状态栏透明和间距处理
    StatusBarUtil.immersive(this);
    StatusBarUtil.setPaddingSmart(this, toolbar);
}
Also used : FlyRefreshHeader(com.scwang.smartrefresh.header.FlyRefreshHeader) RefreshHeader(com.scwang.smartrefresh.layout.api.RefreshHeader) SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ValueAnimator(android.animation.ValueAnimator) ImageView(android.widget.ImageView) View(android.view.View) MountainSceneView(com.scwang.smartrefresh.header.flyrefresh.MountainSceneView) RecyclerView(android.support.v7.widget.RecyclerView) FlyView(com.scwang.smartrefresh.header.flyrefresh.FlyView) TextView(android.widget.TextView) Animator(android.animation.Animator) BaseItemAnimator(jp.wasabeef.recyclerview.animators.BaseItemAnimator) ObjectAnimator(android.animation.ObjectAnimator) ValueAnimator(android.animation.ValueAnimator) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) MountainSceneView(com.scwang.smartrefresh.header.flyrefresh.MountainSceneView) AppBarLayout(android.support.design.widget.AppBarLayout) OnRefreshListener(com.scwang.smartrefresh.layout.listener.OnRefreshListener) Toolbar(android.support.v7.widget.Toolbar)

Example 7 with SimpleMultiPurposeListener

use of com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener in project SmartRefreshLayout by scwang90.

the class WeiboPracticeActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_practice_weibo);
    final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            finish();
        }
    });
    // 状态栏透明和间距处理
    StatusBarUtil.immersive(this);
    StatusBarUtil.setPaddingSmart(this, toolbar);
    final View parallax = findViewById(R.id.parallax);
    final View buttonBar = findViewById(R.id.buttonBarLayout);
    final NestedScrollView scrollView = (NestedScrollView) findViewById(R.id.scrollView);
    final RefreshLayout refreshLayout = (RefreshLayout) findViewById(R.id.refreshLayout);
    findViewById(R.id.attention).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Toast.makeText(view.getContext(), "点击了关注", Toast.LENGTH_SHORT).show();
        }
    });
    findViewById(R.id.leaveword).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Toast.makeText(view.getContext(), "点击了留言", Toast.LENGTH_SHORT).show();
        }
    });
    refreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {

        @Override
        public void onRefresh(@NonNull RefreshLayout refreshLayout) {
            refreshLayout.finishRefresh(3000);
        }

        @Override
        public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
            refreshLayout.finishLoadMore(2000);
        }

        @Override
        public void onHeaderMoving(RefreshHeader header, boolean isDragging, float percent, int offset, int headerHeight, int maxDragHeight) {
            mOffset = offset / 2;
            parallax.setTranslationY(mOffset - mScrollY);
            toolbar.setAlpha(1 - Math.min(percent, 1));
        }
    });
    scrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {

        private int lastScrollY = 0;

        private int h = DensityUtil.dp2px(170);

        private int color = ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary) & 0x00ffffff;

        @Override
        public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
            if (lastScrollY < h) {
                scrollY = Math.min(h, scrollY);
                mScrollY = scrollY > h ? h : scrollY;
                buttonBar.setAlpha(1f * mScrollY / h);
                toolbar.setBackgroundColor(((255 * mScrollY / h) << 24) | color);
                parallax.setTranslationY(mOffset - mScrollY);
            }
            lastScrollY = scrollY;
        }
    });
    buttonBar.setAlpha(0);
    toolbar.setBackgroundColor(0);
}
Also used : RefreshHeader(com.scwang.smartrefresh.layout.api.RefreshHeader) SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) NestedScrollView(android.support.v4.widget.NestedScrollView) View(android.view.View) NestedScrollView(android.support.v4.widget.NestedScrollView) Toolbar(android.support.v7.widget.Toolbar)

Example 8 with SimpleMultiPurposeListener

use of com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener in project SmartRefreshLayout by scwang90.

the class EmptyLayoutExampleFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View root, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(root, savedInstanceState);
    final Toolbar toolbar = (Toolbar) root.findViewById(R.id.toolbar);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            getActivity().finish();
        }
    });
    mRefreshLayout = (RefreshLayout) root.findViewById(refreshLayout);
    mRefreshLayout.setRefreshHeader(new ClassicsHeader(getContext()).setSpinnerStyle(SpinnerStyle.FixedBehind).setPrimaryColorId(R.color.colorPrimary).setAccentColorId(android.R.color.white));
    mRefreshLayout.setOnRefreshListener(this);
    mRecyclerView = (RecyclerView) root.findViewById(recyclerView);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getContext(), VERTICAL));
    mLoadingLayout = (LoadingLayout) root.findViewById(R.id.loading);
    mLoadingLayout.showEmpty();
    /*主动演示刷新*/
    if (mIsNeedDemo) {
        mRefreshLayout.getLayout().postDelayed(new Runnable() {

            @Override
            public void run() {
                if (mIsNeedDemo) {
                    mRefreshLayout.autoRefresh();
                }
            }
        }, 3000);
        mRefreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {

            @Override
            public void onStateChanged(@NonNull RefreshLayout refreshLayout, @NonNull RefreshState oldState, @NonNull RefreshState newState) {
                mIsNeedDemo = false;
            }
        });
    }
}
Also used : SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) ClassicsHeader(com.scwang.smartrefresh.layout.header.ClassicsHeader) RefreshState(com.scwang.smartrefresh.layout.constant.RefreshState) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) View(android.view.View) AdapterView(android.widget.AdapterView) RecyclerView(android.support.v7.widget.RecyclerView) R.id.recyclerView(com.scwang.refreshlayout.R.id.recyclerView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) Toolbar(android.support.v7.widget.Toolbar)

Example 9 with SimpleMultiPurposeListener

use of com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener in project SmartRefreshLayout by scwang90.

the class EmptyLayoutExampleFragmentInner method onViewCreated.

@Override
public void onViewCreated(@NonNull View root, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(root, savedInstanceState);
    final Toolbar toolbar = (Toolbar) root.findViewById(R.id.toolbar);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            getActivity().finish();
        }
    });
    mRefreshLayout = (RefreshLayout) root.findViewById(refreshLayout);
    mRefreshLayout.setRefreshHeader(new ClassicsHeader(getContext()).setSpinnerStyle(SpinnerStyle.FixedBehind).setPrimaryColorId(R.color.colorPrimary).setAccentColorId(android.R.color.white));
    mRefreshLayout.setOnRefreshListener(this);
    mRecyclerView = (RecyclerView) root.findViewById(recyclerView);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getContext(), VERTICAL));
    mEmptyLayout = root.findViewById(R.id.empty);
    ImageView image = (ImageView) root.findViewById(R.id.empty_image);
    image.setImageResource(R.drawable.ic_empty);
    TextView empty = (TextView) root.findViewById(R.id.empty_text);
    empty.setText("暂无数据下拉刷新");
    /*主动演示刷新*/
    if (mIsNeedDemo) {
        mRefreshLayout.getLayout().postDelayed(new Runnable() {

            @Override
            public void run() {
                if (mIsNeedDemo) {
                    mRefreshLayout.autoRefresh();
                }
            }
        }, 3000);
        mRefreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {

            @Override
            public void onStateChanged(@NonNull RefreshLayout refreshLayout, @NonNull RefreshState oldState, @NonNull RefreshState newState) {
                mIsNeedDemo = false;
            }
        });
    }
}
Also used : SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) ClassicsHeader(com.scwang.smartrefresh.layout.header.ClassicsHeader) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) R.id.recyclerView(com.scwang.refreshlayout.R.id.recyclerView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) RefreshLayout(com.scwang.smartrefresh.layout.api.RefreshLayout) RefreshState(com.scwang.smartrefresh.layout.constant.RefreshState) TextView(android.widget.TextView) ImageView(android.widget.ImageView) Toolbar(android.support.v7.widget.Toolbar)

Example 10 with SimpleMultiPurposeListener

use of com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener in project Awesome-WanAndroid by JsonChao.

the class AboutUsActivity method initEventAndData.

@Override
protected void initEventAndData() {
    setSupportActionBar(mToolbar);
    StatusBarUtil.immersive(this);
    StatusBarUtil.setPaddingSmart(this, mToolbar);
    mToolbar.setNavigationOnClickListener(v -> onBackPressedSupport());
    // 设置内容
    mAboutContent.setText(Html.fromHtml(getString(R.string.about_content)));
    mAboutContent.setMovementMethod(LinkMovementMethod.getInstance());
    try {
        String versionStr = getString(R.string.awesome_wan_android) + " V" + getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
        mAboutVersion.setText(versionStr);
    } catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace();
    }
    // 绑定场景和纸飞机
    mFlyRefreshHeader.setUp(mAboutUsMountain, mAboutUsFlyView);
    mAboutUsRefreshLayout.setReboundInterpolator(new ElasticOutInterpolator());
    mAboutUsRefreshLayout.setReboundDuration(800);
    mAboutUsRefreshLayout.setOnRefreshListener(refreshLayout -> {
        updateTheme();
        refreshLayout.finishRefresh(1000);
    });
    // 设置让Toolbar和AppBarLayout的滚动同步
    mAboutUsRefreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {

        @Override
        public void onHeaderPulling(RefreshHeader header, float percent, int offset, int headerHeight, int extendHeight) {
            if (mAboutUsAppBar == null || mToolbar == null) {
                return;
            }
            mAboutUsAppBar.setTranslationY(offset);
            mToolbar.setTranslationY(-offset);
        }

        @Override
        public void onHeaderReleasing(RefreshHeader header, float percent, int offset, int footerHeight, int extendHeight) {
            if (mAboutUsAppBar == null || mToolbar == null) {
                return;
            }
            mAboutUsAppBar.setTranslationY(offset);
            mToolbar.setTranslationY(-offset);
        }
    });
    // 进入界面时自动刷新
    mAboutUsRefreshLayout.autoRefresh();
    // 点击悬浮按钮时自动刷新
    mAboutUsFab.setOnClickListener(v -> mAboutUsRefreshLayout.autoRefresh());
    /*
         * 监听 AppBarLayout 的关闭和开启 给 FlyView(纸飞机) 和 ActionButton 设置关闭隐藏动画
         */
    mAboutUsAppBar.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {

        boolean misAppbarExpand = true;

        @Override
        public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
            int scrollRange = appBarLayout.getTotalScrollRange();
            float fraction = 1f * (scrollRange + verticalOffset) / scrollRange;
            double minFraction = 0.1;
            double maxFraction = 0.8;
            if (fraction < minFraction && misAppbarExpand) {
                misAppbarExpand = false;
                mAboutUsFab.animate().scaleX(0).scaleY(0);
                mAboutUsFlyView.animate().scaleX(0).scaleY(0);
                ValueAnimator animator = ValueAnimator.ofInt(mScrollView.getPaddingTop(), 0);
                animator.setDuration(300);
                animator.addUpdateListener(animation -> mScrollView.setPadding(0, (int) animation.getAnimatedValue(), 0, 0));
                animator.start();
            }
            if (fraction > maxFraction && !misAppbarExpand) {
                misAppbarExpand = true;
                mAboutUsFab.animate().scaleX(1).scaleY(1);
                mAboutUsFlyView.animate().scaleX(1).scaleY(1);
                ValueAnimator animator = ValueAnimator.ofInt(mScrollView.getPaddingTop(), DensityUtil.dp2px(25));
                animator.setDuration(300);
                animator.addUpdateListener(animation -> mScrollView.setPadding(0, (int) animation.getAnimatedValue(), 0, 0));
                animator.start();
            }
        }
    });
}
Also used : AppBarLayout(android.support.design.widget.AppBarLayout) R(json.chao.com.wanandroid.R) ElasticOutInterpolator(json.chao.com.wanandroid.widget.interpolator.ElasticOutInterpolator) Bundle(android.os.Bundle) StatusBarUtil(json.chao.com.wanandroid.utils.StatusBarUtil) PackageManager(android.content.pm.PackageManager) ButterKnife(butterknife.ButterKnife) FlyRefreshHeader(com.scwang.smartrefresh.header.FlyRefreshHeader) LinkMovementMethod(android.text.method.LinkMovementMethod) BindView(butterknife.BindView) ColorStateList(android.content.res.ColorStateList) SmartRefreshLayout(com.scwang.smartrefresh.layout.SmartRefreshLayout) RefreshHeader(com.scwang.smartrefresh.layout.api.RefreshHeader) DensityUtil(com.scwang.smartrefresh.layout.util.DensityUtil) View(android.view.View) NestedScrollView(android.support.v4.widget.NestedScrollView) AbstractSimpleActivity(json.chao.com.wanandroid.base.activity.AbstractSimpleActivity) CollapsingToolbarLayout(android.support.design.widget.CollapsingToolbarLayout) MountainSceneView(com.scwang.smartrefresh.header.flyrefresh.MountainSceneView) FloatingActionButton(android.support.design.widget.FloatingActionButton) ContextCompat(android.support.v4.content.ContextCompat) FlyView(com.scwang.smartrefresh.header.flyrefresh.FlyView) TextView(android.widget.TextView) Toolbar(android.support.v7.widget.Toolbar) Html(android.text.Html) SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) ValueAnimator(android.animation.ValueAnimator) FlyRefreshHeader(com.scwang.smartrefresh.header.FlyRefreshHeader) RefreshHeader(com.scwang.smartrefresh.layout.api.RefreshHeader) SimpleMultiPurposeListener(com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener) ValueAnimator(android.animation.ValueAnimator) ElasticOutInterpolator(json.chao.com.wanandroid.widget.interpolator.ElasticOutInterpolator) PackageManager(android.content.pm.PackageManager) AppBarLayout(android.support.design.widget.AppBarLayout)

Aggregations

Toolbar (android.support.v7.widget.Toolbar)10 View (android.view.View)10 SimpleMultiPurposeListener (com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener)10 RefreshLayout (com.scwang.smartrefresh.layout.api.RefreshLayout)9 RefreshState (com.scwang.smartrefresh.layout.constant.RefreshState)6 RefreshHeader (com.scwang.smartrefresh.layout.api.RefreshHeader)5 TextView (android.widget.TextView)4 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)3 RecyclerView (android.support.v7.widget.RecyclerView)3 ValueAnimator (android.animation.ValueAnimator)2 AppBarLayout (android.support.design.widget.AppBarLayout)2 NestedScrollView (android.support.v4.widget.NestedScrollView)2 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)2 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)2 AdapterView (android.widget.AdapterView)2 ImageView (android.widget.ImageView)2 R.id.recyclerView (com.scwang.refreshlayout.R.id.recyclerView)2 FlyRefreshHeader (com.scwang.smartrefresh.header.FlyRefreshHeader)2 FlyView (com.scwang.smartrefresh.header.flyrefresh.FlyView)2 MountainSceneView (com.scwang.smartrefresh.header.flyrefresh.MountainSceneView)2