Search in sources :

Example 1 with ICheckBindingScroller

use of com.taobao.weex.common.ICheckBindingScroller in project incubator-weex by apache.

the class WXScroller method initComponentHostView.

@Override
protected ViewGroup initComponentHostView(@NonNull Context context) {
    String scroll;
    if (getDomObject() == null || getDomObject().getAttrs().isEmpty()) {
        scroll = "vertical";
    } else {
        scroll = getDomObject().getAttrs().getScrollDirection();
    }
    ViewGroup host;
    if (("horizontal").equals(scroll)) {
        mOrientation = Constants.Orientation.HORIZONTAL;
        WXHorizontalScrollView scrollView = new WXHorizontalScrollView(context);
        mRealView = new FrameLayout(context);
        scrollView.setScrollViewListener(new WXHorizontalScrollView.ScrollViewListener() {

            @Override
            public void onScrollChanged(WXHorizontalScrollView scrollView, int x, int y, int oldx, int oldy) {
                procAppear(x, y, oldx, oldy);
            }
        });
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        scrollView.addView(mRealView, layoutParams);
        scrollView.setHorizontalScrollBarEnabled(false);
        host = scrollView;
    } else {
        mOrientation = Constants.Orientation.VERTICAL;
        BounceScrollerView scrollerView = new BounceScrollerView(context, mOrientation, this);
        mRealView = new FrameLayout(context);
        WXScrollView innerView = scrollerView.getInnerView();
        innerView.addScrollViewListener(this);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        innerView.addView(mRealView, layoutParams);
        innerView.setVerticalScrollBarEnabled(true);
        innerView.setNestedScrollingEnabled(WXUtils.getBoolean(getDomObject().getAttrs().get(Constants.Name.NEST_SCROLLING_ENABLED), true));
        innerView.addScrollViewListener(new WXScrollViewListener() {

            @Override
            public void onScrollChanged(WXScrollView scrollView, int x, int y, int oldx, int oldy) {
            }

            @Override
            public void onScrollToBottom(WXScrollView scrollView, int x, int y) {
            }

            @Override
            public void onScrollStopped(WXScrollView scrollView, int x, int y) {
                List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
                if (listeners != null && listeners.size() > 0) {
                    for (OnWXScrollListener listener : listeners) {
                        if (listener != null) {
                            listener.onScrollStateChanged(scrollView, x, y, OnWXScrollListener.IDLE);
                        }
                    }
                }
            }

            @Override
            public void onScroll(WXScrollView scrollView, int x, int y) {
                List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
                if (listeners != null && listeners.size() > 0) {
                    for (OnWXScrollListener listener : listeners) {
                        if (listener != null) {
                            if (listener instanceof ICheckBindingScroller) {
                                if (((ICheckBindingScroller) listener).isNeedScroller(getRef(), null)) {
                                    listener.onScrolled(scrollView, x, y);
                                }
                            } else {
                                listener.onScrolled(scrollView, x, y);
                            }
                        }
                    }
                }
            }
        });
        host = scrollerView;
    }
    host.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
        @Override
        public void onGlobalLayout() {
            procAppear(0, 0, 0, 0);
            View view;
            if ((view = getHostView()) == null) {
                return;
            }
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
                view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            } else {
                view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
            }
        }
    });
    return host;
}
Also used : LayoutParams(android.widget.FrameLayout.LayoutParams) ViewGroup(android.view.ViewGroup) WXHorizontalScrollView(com.taobao.weex.ui.view.WXHorizontalScrollView) ICheckBindingScroller(com.taobao.weex.common.ICheckBindingScroller) OnWXScrollListener(com.taobao.weex.common.OnWXScrollListener) BounceScrollerView(com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) View(android.view.View) WXScrollView(com.taobao.weex.ui.view.WXScrollView) WXHorizontalScrollView(com.taobao.weex.ui.view.WXHorizontalScrollView) BaseBounceView(com.taobao.weex.ui.view.refresh.wrapper.BaseBounceView) Point(android.graphics.Point) WXScrollView(com.taobao.weex.ui.view.WXScrollView) LayoutParams(android.widget.FrameLayout.LayoutParams) FrameLayout(android.widget.FrameLayout) BounceScrollerView(com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) ArrayList(java.util.ArrayList) List(java.util.List) ViewTreeObserver(android.view.ViewTreeObserver) TargetApi(android.annotation.TargetApi) WXScrollViewListener(com.taobao.weex.ui.view.WXScrollView.WXScrollViewListener)

Example 2 with ICheckBindingScroller

use of com.taobao.weex.common.ICheckBindingScroller in project incubator-weex by apache.

the class WXRecyclerTemplateList method initComponentHostView.

@Override
protected BounceRecyclerView initComponentHostView(@NonNull Context context) {
    final BounceRecyclerView bounceRecyclerView = new BounceRecyclerView(context, mLayoutType, mColumnCount, mColumnGap, getOrientation());
    WXAttr attrs = getDomObject().getAttrs();
    String transforms = (String) attrs.get(Constants.Name.TRANSFORM);
    if (transforms != null) {
        bounceRecyclerView.getInnerView().addItemDecoration(RecyclerTransform.parseTransforms(getOrientation(), transforms));
    }
    mItemAnimator = bounceRecyclerView.getInnerView().getItemAnimator();
    if (attrs.get(NAME_TEMPLATE_CACHE_SIZE) != null) {
        templateCacheSize = WXUtils.getInteger(attrs.get(NAME_TEMPLATE_CACHE_SIZE), templateCacheSize);
    }
    boolean hasFixedSize = false;
    int itemViewCacheSize = 2;
    if (attrs.get(NAME_ITEM_VIEW_CACHE_SIZE) != null) {
        itemViewCacheSize = WXUtils.getNumberInt(getDomObject().getAttrs().get(NAME_ITEM_VIEW_CACHE_SIZE), itemViewCacheSize);
    }
    if (attrs.get(NAME_HAS_FIXED_SIZE) != null) {
        hasFixedSize = WXUtils.getBoolean(attrs.get(NAME_HAS_FIXED_SIZE), hasFixedSize);
    }
    RecyclerViewBaseAdapter recyclerViewBaseAdapter = new RecyclerViewBaseAdapter<>(this);
    recyclerViewBaseAdapter.setHasStableIds(true);
    bounceRecyclerView.getInnerView().setItemAnimator(null);
    if (itemViewCacheSize != 2) {
        bounceRecyclerView.getInnerView().setItemViewCacheSize(itemViewCacheSize);
    }
    if (bounceRecyclerView.getSwipeLayout() != null) {
        if (WXUtils.getBoolean(getDomObject().getAttrs().get("nestedScrollingEnabled"), false)) {
            bounceRecyclerView.getSwipeLayout().setNestedScrollingEnabled(true);
        }
    }
    bounceRecyclerView.getInnerView().setHasFixedSize(hasFixedSize);
    bounceRecyclerView.setRecyclerViewBaseAdapter(recyclerViewBaseAdapter);
    bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
    bounceRecyclerView.getInnerView().clearOnScrollListeners();
    bounceRecyclerView.getInnerView().addOnScrollListener(mViewOnScrollListener);
    bounceRecyclerView.getInnerView().addOnScrollListener(new RecyclerView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
            super.onScrollStateChanged(recyclerView, newState);
            List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
            if (listeners != null && listeners.size() > 0) {
                for (OnWXScrollListener listener : listeners) {
                    if (listener != null) {
                        View topView = recyclerView.getChildAt(0);
                        if (topView != null) {
                            int y = topView.getTop();
                            listener.onScrollStateChanged(recyclerView, 0, y, newState);
                        }
                    }
                }
            }
        }

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);
            List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
            if (listeners != null && listeners.size() > 0) {
                try {
                    for (OnWXScrollListener listener : listeners) {
                        if (listener != null) {
                            if (listener instanceof ICheckBindingScroller) {
                                if (((ICheckBindingScroller) listener).isNeedScroller(getRef(), null)) {
                                    listener.onScrolled(recyclerView, dx, dy);
                                }
                            } else {
                                listener.onScrolled(recyclerView, dx, dy);
                            }
                        }
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    });
    bounceRecyclerView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
        @Override
        public void onGlobalLayout() {
            BounceRecyclerView view;
            if ((view = getHostView()) == null)
                return;
            mViewOnScrollListener.onScrolled(view.getInnerView(), 0, 0);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
                view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            } else {
                view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
            }
        }
    });
    listUpdateRunnable = new Runnable() {

        @Override
        public void run() {
            /**
             * compute sticky position
             */
            if (mStickyHelper != null) {
                if (mStickyHelper.getStickyTypes().size() > 0) {
                    mStickyHelper.getStickyPositions().clear();
                    if (cellDataManager.listData != null) {
                        for (int i = 0; i < cellDataManager.listData.size(); i++) {
                            WXCell cell = getSourceTemplate(i);
                            if (cell == null) {
                                continue;
                            }
                            if (cell.isSticky()) {
                                mStickyHelper.getStickyPositions().add(i);
                            }
                        }
                    }
                }
            }
            if (getHostView() != null && getHostView().getRecyclerViewBaseAdapter() != null) {
                getHostView().getRecyclerViewBaseAdapter().notifyDataSetChanged();
            }
            if (WXEnvironment.isOpenDebugLog() && ENABLE_TRACE_LOG) {
                WXLogUtils.d(TAG, "WXTemplateList notifyDataSetChanged");
            }
        }
    };
    return bounceRecyclerView;
}
Also used : BounceRecyclerView(com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView) ICheckBindingScroller(com.taobao.weex.common.ICheckBindingScroller) OnWXScrollListener(com.taobao.weex.common.OnWXScrollListener) WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) BounceRecyclerView(com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView) Point(android.graphics.Point) WXCell(com.taobao.weex.ui.component.list.WXCell) RecyclerViewBaseAdapter(com.taobao.weex.ui.view.listview.adapter.RecyclerViewBaseAdapter) WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) RecyclerView(android.support.v7.widget.RecyclerView) BounceRecyclerView(com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView) List(java.util.List) ArrayList(java.util.ArrayList) ViewTreeObserver(android.view.ViewTreeObserver) TargetApi(android.annotation.TargetApi) WXAttr(com.taobao.weex.dom.WXAttr)

Example 3 with ICheckBindingScroller

use of com.taobao.weex.common.ICheckBindingScroller in project WeexErosFramework by bmfe.

the class HookWxScroller method initComponentHostView.

protected ViewGroup initComponentHostView(@NonNull Context context) {
    String scroll;
    if (this.getDomObject() != null && !this.getDomObject().getAttrs().isEmpty()) {
        scroll = this.getDomObject().getAttrs().getScrollDirection();
    } else {
        scroll = "vertical";
    }
    Object host;
    if ("horizontal".equals(scroll)) {
        this.mOrientation = 0;
        HookWXHorizontalScrollView scrollView = new HookWXHorizontalScrollView(context);
        this.mRealView = new FrameLayout(context);
        scrollView.setScrollViewListener(new WXHorizontalScrollView.ScrollViewListener() {

            public void onScrollChanged(WXHorizontalScrollView scrollView, int x, int y, int oldx, int oldy) {
                procAppear(x, y, oldx, oldy);
            }
        });
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
        scrollView.addView(this.mRealView, layoutParams);
        scrollView.setHorizontalScrollBarEnabled(false);
        host = scrollView;
    } else {
        this.mOrientation = 1;
        HookBounceScrollerView scrollerView = new HookBounceScrollerView(context, this.mOrientation, this);
        this.mRealView = new FrameLayout(context);
        WXScrollView innerView = (WXScrollView) scrollerView.getInnerView();
        innerView.addScrollViewListener(this);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
        innerView.addView(this.mRealView, layoutParams);
        innerView.setVerticalScrollBarEnabled(true);
        innerView.setNestedScrollingEnabled(WXUtils.getBoolean(this.getDomObject().getAttrs().get("nestedScrollingEnabled"), Boolean.valueOf(true)).booleanValue());
        innerView.addScrollViewListener(new WXScrollView.WXScrollViewListener() {

            public void onScrollChanged(WXScrollView scrollView, int x, int y, int oldx, int oldy) {
            }

            public void onScrollToBottom(WXScrollView scrollView, int x, int y) {
            }

            public void onScrollStopped(WXScrollView scrollView, int x, int y) {
                List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
                if (listeners != null && listeners.size() > 0) {
                    Iterator var5 = listeners.iterator();
                    while (var5.hasNext()) {
                        OnWXScrollListener listener = (OnWXScrollListener) var5.next();
                        if (listener != null) {
                            listener.onScrollStateChanged(scrollView, x, y, 0);
                        }
                    }
                }
            }

            public void onScroll(WXScrollView scrollView, int x, int y) {
                List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
                if (listeners != null && listeners.size() > 0) {
                    Iterator var5 = listeners.iterator();
                    while (var5.hasNext()) {
                        OnWXScrollListener listener = (OnWXScrollListener) var5.next();
                        if (listener != null) {
                            if (listener instanceof ICheckBindingScroller) {
                                if (((ICheckBindingScroller) listener).isNeedScroller(getRef(), (Object) null)) {
                                    listener.onScrolled(scrollView, x, y);
                                }
                            } else {
                                listener.onScrolled(scrollView, x, y);
                            }
                        }
                    }
                }
            }
        });
        host = scrollerView;
    }
    ((ViewGroup) host).getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @TargetApi(16)
        public void onGlobalLayout() {
            procAppear(0, 0, 0, 0);
            View view;
            if ((view = getHostView()) != null) {
                if (Build.VERSION.SDK_INT >= 16) {
                    view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                } else {
                    view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
                }
            }
        }
    });
    return (ViewGroup) host;
}
Also used : WXHorizontalScrollView(com.taobao.weex.ui.view.WXHorizontalScrollView) HookWXHorizontalScrollView(com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView) ViewGroup(android.view.ViewGroup) ICheckBindingScroller(com.taobao.weex.common.ICheckBindingScroller) OnWXScrollListener(com.taobao.weex.common.OnWXScrollListener) View(android.view.View) WXHorizontalScrollView(com.taobao.weex.ui.view.WXHorizontalScrollView) BaseBounceView(com.taobao.weex.ui.view.refresh.wrapper.BaseBounceView) BounceScrollerView(com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView) HookWXHorizontalScrollView(com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView) WXScrollView(com.taobao.weex.ui.view.WXScrollView) HookBounceScrollerView(com.eros.framework.extend.hook.ui.view.HookBounceScrollerView) Point(android.graphics.Point) HookWXHorizontalScrollView(com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView) WXScrollView(com.taobao.weex.ui.view.WXScrollView) FrameLayout(android.widget.FrameLayout) Iterator(java.util.Iterator) WXDomObject(com.taobao.weex.dom.WXDomObject) HookBounceScrollerView(com.eros.framework.extend.hook.ui.view.HookBounceScrollerView) List(java.util.List) ArrayList(java.util.ArrayList) ViewTreeObserver(android.view.ViewTreeObserver) TargetApi(android.annotation.TargetApi)

Example 4 with ICheckBindingScroller

use of com.taobao.weex.common.ICheckBindingScroller in project incubator-weex by apache.

the class BasicListComponent method initComponentHostView.

@Override
protected T initComponentHostView(@NonNull Context context) {
    T bounceRecyclerView = generateListView(context, getOrientation());
    String transforms = (String) getDomObject().getAttrs().get(TRANSFORM);
    if (transforms != null) {
        bounceRecyclerView.getInnerView().addItemDecoration(RecyclerTransform.parseTransforms(getOrientation(), transforms));
    }
    if (getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY) != null) {
        keepPositionLayoutDelay = WXUtils.getNumberInt(getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY), (int) keepPositionLayoutDelay);
    }
    if (getDomObject().getAttrs().get("appearActionDelay") != null) {
        mAppearDelay = WXUtils.getNumberInt(getDomObject().getAttrs().get("appearActionDelay"), (int) mAppearDelay);
    }
    mItemAnimator = bounceRecyclerView.getInnerView().getItemAnimator();
    RecyclerViewBaseAdapter recyclerViewBaseAdapter = new RecyclerViewBaseAdapter<>(this);
    recyclerViewBaseAdapter.setHasStableIds(true);
    bounceRecyclerView.setRecyclerViewBaseAdapter(recyclerViewBaseAdapter);
    bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
    bounceRecyclerView.getInnerView().clearOnScrollListeners();
    bounceRecyclerView.getInnerView().addOnScrollListener(mViewOnScrollListener);
    if (getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE) != null) {
        boolean hasFixedSize = WXUtils.getBoolean(getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE), false);
        bounceRecyclerView.getInnerView().setHasFixedSize(hasFixedSize);
    }
    bounceRecyclerView.getInnerView().addOnScrollListener(new RecyclerView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
            super.onScrollStateChanged(recyclerView, newState);
            List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
            if (listeners != null && listeners.size() > 0) {
                for (OnWXScrollListener listener : listeners) {
                    if (listener != null) {
                        View topView = recyclerView.getChildAt(0);
                        if (topView != null) {
                            int y = topView.getTop();
                            listener.onScrollStateChanged(recyclerView, 0, y, newState);
                        }
                    }
                }
            }
        }

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);
            List<OnWXScrollListener> listeners = getInstance().getWXScrollListeners();
            if (listeners != null && listeners.size() > 0) {
                try {
                    for (OnWXScrollListener listener : listeners) {
                        if (listener != null) {
                            if (listener instanceof ICheckBindingScroller) {
                                if (((ICheckBindingScroller) listener).isNeedScroller(getRef(), null)) {
                                    listener.onScrolled(recyclerView, dx, dy);
                                }
                            } else {
                                listener.onScrolled(recyclerView, dx, dy);
                            }
                        }
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    });
    bounceRecyclerView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
        @Override
        public void onGlobalLayout() {
            T view;
            if ((view = getHostView()) == null)
                return;
            mViewOnScrollListener.onScrolled(view.getInnerView(), 0, 0);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
                view.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            } else {
                view.getViewTreeObserver().removeGlobalOnLayoutListener(this);
            }
        }
    });
    return bounceRecyclerView;
}
Also used : ICheckBindingScroller(com.taobao.weex.common.ICheckBindingScroller) OnWXScrollListener(com.taobao.weex.common.OnWXScrollListener) WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) BounceRecyclerView(com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView) Point(android.graphics.Point) RecyclerViewBaseAdapter(com.taobao.weex.ui.view.listview.adapter.RecyclerViewBaseAdapter) WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) RecyclerView(android.support.v7.widget.RecyclerView) BounceRecyclerView(com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView) List(java.util.List) ArrayList(java.util.ArrayList) ViewTreeObserver(android.view.ViewTreeObserver) TargetApi(android.annotation.TargetApi)

Aggregations

TargetApi (android.annotation.TargetApi)4 Point (android.graphics.Point)4 View (android.view.View)4 ViewTreeObserver (android.view.ViewTreeObserver)4 ICheckBindingScroller (com.taobao.weex.common.ICheckBindingScroller)4 OnWXScrollListener (com.taobao.weex.common.OnWXScrollListener)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 RecyclerView (android.support.v7.widget.RecyclerView)2 ViewGroup (android.view.ViewGroup)2 FrameLayout (android.widget.FrameLayout)2 WXHorizontalScrollView (com.taobao.weex.ui.view.WXHorizontalScrollView)2 WXScrollView (com.taobao.weex.ui.view.WXScrollView)2 WXRecyclerView (com.taobao.weex.ui.view.listview.WXRecyclerView)2 RecyclerViewBaseAdapter (com.taobao.weex.ui.view.listview.adapter.RecyclerViewBaseAdapter)2 BaseBounceView (com.taobao.weex.ui.view.refresh.wrapper.BaseBounceView)2 BounceRecyclerView (com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView)2 BounceScrollerView (com.taobao.weex.ui.view.refresh.wrapper.BounceScrollerView)2 LayoutParams (android.widget.FrameLayout.LayoutParams)1 HookBounceScrollerView (com.eros.framework.extend.hook.ui.view.HookBounceScrollerView)1