List of usage examples for android.support.v4.view NestedScrollingParentHelper NestedScrollingParentHelper
public NestedScrollingParentHelper(ViewGroup viewGroup)
From source file:com.lovejjfg.blogdemo.ui.HeadViewFrameLayout.java
public HeadViewFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true);/*from ww w . j a v a 2 s .c om*/ }
From source file:com.lovejjfg.blogdemo.ui.HeaderRefreshLayout.java
public HeaderRefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true);/*from w w w.j a va 2 s . c om*/ header = new TouchCircleView(getContext()); header.addLoadingListener(this); float density = context.getResources().getDisplayMetrics().density; addView(header, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) (density * 120))); }
From source file:com.views.ttRefrash.HeaderRefreshLayout.java
public HeaderRefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true);//from ww w .j a va2 s .co m // header = new TouchCircleView(getContext()); header.addLoadingListener(this); float density = context.getResources().getDisplayMetrics().density; // addView(header, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) (density * 130))); }
From source file:com.example.tt.pullrefresh.widget.HeaderRefreshLayout.java
public HeaderRefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true);//from www . j a v a 2 s . c om header = new TouchCircleView(getContext()); header.addLoadingListener(this); float density = context.getResources().getDisplayMetrics().density; addView(header, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) (density * 130))); }
From source file:jiajun.threelevelistview.layout.FlingLayout.java
public void init(Context context) { version = android.os.Build.VERSION.SDK_INT; mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mScroller = new Scroller(context, new DecelerateInterpolator()); mParentHelper = new NestedScrollingParentHelper(this); mChildHelper = new NestedScrollingChildHelper(this); }
From source file:xyz.openhh.compat.widget.CompatSwipeRefreshLayout.java
public CompatSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); init(context, attrs);/*from w w w . j a va 2 s.c o m*/ }
From source file:com.cocarechina.pullrefreshview.layout.FlingLayout.java
public void init(Context context) { version = android.os.Build.VERSION.SDK_INT; mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mScroller = new Scroller(context, new AccelerateDecelerateInterpolator()); mParentHelper = new NestedScrollingParentHelper(this); mChildHelper = new NestedScrollingChildHelper(this); }
From source file:com.lovejjfg.powerrefresh.PowerRefreshLayout.java
public PowerRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true);// w ww.j a va2 s. c om mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); ensureTarget(); }
From source file:com.shizhefei.view.coolrefreshview.CoolRefreshView.java
private void init() { mPullHandler = new ProxyPullHeader(HEADER_FACTORY.made(getContext())); mIsPinContent = HEADER_FACTORY.isPinContent(); if (mIsPinContent) { scrollerHelper = new PinContentScroller(); } else {/*from www. j a va2s . c o m*/ scrollerHelper = new AllScroller(); } setWillNotDraw(false); addHeadView(); final ViewConfiguration configuration = ViewConfiguration.get(getContext()); mTouchSlop = configuration.getScaledTouchSlop(); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
From source file:com.gu.swiperefresh.SwipeRefreshPlush.java
public SwipeRefreshPlush(Context context, AttributeSet attrs) { super(context, attrs); mLoadViewController = new LoadViewController(context, this); mRefreshController = new RefreshViewController(context, this); // mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); final ViewConfiguration configuration = ViewConfiguration.get(getContext()); mTouchSlop = configuration.getScaledTouchSlop(); mMinimumVelocity = configuration.getScaledMinimumFlingVelocity(); mMaximumVelocity = configuration.getScaledMaximumFlingVelocity(); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mScroller = ScrollerCompat.create(getContext()); createProgressView();//from w w w .jav a2 s .c o m ViewCompat.setChildrenDrawingOrderEnabled(this, true); }