Example usage for android.support.v4.view NestedScrollingChildHelper NestedScrollingChildHelper

List of usage examples for android.support.v4.view NestedScrollingChildHelper NestedScrollingChildHelper

Introduction

In this page you can find the example usage for android.support.v4.view NestedScrollingChildHelper NestedScrollingChildHelper.

Prototype

public NestedScrollingChildHelper(View view) 

Source Link

Document

Construct a new helper for a given view.

Usage

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);// ww  w .jav  a2s.  c  o m
}

From source file:ti.modules.titanium.ui.widget.TiUIEditText.java

/**
 * Initializes this view's settings and member variables.
 * This method is only expected to be called once from this class' constructor.
 */// ww w. j a v  a2s . co m
private void initializeView() {
    // Fetch the system's min touch move distance until it's considered to be a drag event.
    // Note: This is the same setting Android's ScrollViews use.
    ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
    if (viewConfiguration != null) {
        this.minDragStartDistance = viewConfiguration.getScaledTouchSlop();
    }

    // Set up this view for nested scrolling.
    this.nestedScrollingHelper = new NestedScrollingChildHelper(this);
    setNestedScrollingEnabled(true);
}

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);//from   w w  w  . j av a2  s. c o  m
    mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    ensureTarget();
}

From source file:com.conduit.plastic.widget.NestedWebView.java

private void init() {
    this.mChildHelper = new NestedScrollingChildHelper(this);
    setNestedScrollingEnabled(true);// w w w  . j a v a  2  s  .  c om
    ViewConfiguration configuration = ViewConfiguration.get(getContext());
    this.mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
    this.mMaximumVelocity = configuration.getScaledMaximumFlingVelocity();
    this.mTouchSlop = configuration.getScaledTouchSlop();
    this.directionDetector = new DirectionDetector();
    this.density = getScale();
    setOverScrollMode(View.OVER_SCROLL_NEVER);
    this.settings = getSettings();
    //        addJavascriptInterface(new JSGetContentHeight(), "InjectedObject");
    Log.i(TAG, "max -- min Velocity = " + this.mMaximumVelocity + " -- " + this.mMinimumVelocity
            + " touchSlop = " + this.mTouchSlop);
}

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  w  w  w. j a va  2  s .  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();/* w ww . ja v a  2  s. c o m*/
    ViewCompat.setChildrenDrawingOrderEnabled(this, true);
}

From source file:im.delight.android.webview.AdvancedWebView.java

public AdvancedWebView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    init(context);// www  .  j  av a 2s. co  m
    mChildHelper = new NestedScrollingChildHelper(this);
    setNestedScrollingEnabled(true);
}

From source file:com.creativtrendz.folio.ui.FolioWebViewScroll.java

public FolioWebViewScroll(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    init(context);//from  www  .  j  a  v a 2 s.c  om
    mChildHelper = new NestedScrollingChildHelper(this);
    setNestedScrollingEnabled(true);
}