private void init() { mChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
public RecyclerRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mRefreshViewSize = (int) (DEFAULT_REFRESH_SIZE_DP * metrics.density); mRefreshTargetOffset = DEFAULT_REFRESH_TARGET_OFFSET_DP * metrics.density; mTargetOrRefreshViewOffsetY = 0.0f; mRefreshInitialOffset = 0.0f; mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); initRefreshView(); initDragDistanceConverter(); setNestedScrollingEnabled(true); ViewCompat.setChildrenDrawingOrderEnabled(this, true); }
/** * Constructor that is called when inflating PullToRefreshLayout from XML. * * @param context * @param attrs */ public PullToRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger( android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mCircleWidth = (int) (CIRCLE_DIAMETER * metrics.density); mCircleHeight = (int) (CIRCLE_DIAMETER * metrics.density); createProgressView(); ViewCompat.setChildrenDrawingOrderEnabled(this, true); // the absolute offset has to take into account that the circle starts at an offset mSpinnerFinalOffset = DEFAULT_CIRCLE_TARGET * metrics.density; mTotalDragDistance = mSpinnerFinalOffset; mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
private void init() { setWillNotDraw(false); startScrollerTask(); setOverScrollMode(View.OVER_SCROLL_NEVER); childHelper = new NestedScrollingChildHelper(this); childHelper.setNestedScrollingEnabled(true); }
public NestedWebView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
public NestedWebView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
private void initData() { if (mScrollingChildHelper == null) { mScrollingChildHelper = new NestedScrollingChildHelper(this); mScrollingChildHelper.setNestedScrollingEnabled(true); } }
private void initData() { if (mScrollingChildHelper == null) { mScrollingChildHelper = new NestedScrollingChildHelper(this); mScrollingChildHelper.setNestedScrollingEnabled(true); } }
private NestedScrollingChildHelper getScrollingChildHelper() { if (mScrollingChildHelper == null) { mScrollingChildHelper = new NestedScrollingChildHelper(this); mScrollingChildHelper.setNestedScrollingEnabled(true); } return mScrollingChildHelper; }
private NestedScrollingChildHelper getScrollingChildHelper() { if (mNestedScrollingChildHelper == null) { mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); mNestedScrollingChildHelper.setNestedScrollingEnabled(true); } return mNestedScrollingChildHelper; }
public ListView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); } /*
void init() { nestedScrollingChildHelper = new NestedScrollingChildHelper(this); nestedScrollingChildHelper.setNestedScrollingEnabled(true); }
private void init() { mChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); }
private void init() { mChildHelper = new NestedScrollingChildHelper(this); mChildHelper.setNestedScrollingEnabled(true); }
private void initialize() { this.nestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); this.touchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); }
public NestedScrollingChildView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); mDetector = new GestureDetectorCompat(context, this); setNestedScrollingEnabled(true); }
private void initialize() { this.nestedScrollingChildHelper = new NestedScrollingChildHelper(this); this.nestedScrollingParentHelper = new NestedScrollingParentHelper(this); setNestedScrollingEnabled(true); setForceScrolling(false); this.touchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); }
public ApptentiveNestedScrollView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initScrollView(); final TypedArray a = context.obtainStyledAttributes( attrs, SCROLLVIEW_STYLEABLE, defStyleAttr, 0); setFillViewport(a.getBoolean(0, false)); a.recycle(); mParentHelper = new NestedScrollingParentHelper(this); mChildHelper = new NestedScrollingChildHelper(this); // ...because why else would you be using this widget? setNestedScrollingEnabled(true); ViewCompat.setAccessibilityDelegate(this, ACCESSIBILITY_DELEGATE); }
public HeaderRefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); setNestedScrollingEnabled(true); 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))); }
public EventResolver(FlingLayout.FlingLayoutContext flingLayoutContext) { this.c = flingLayoutContext; mParentHelper = new NestedScrollingParentHelper(c.getFlingLayout()); mChildHelper = new NestedScrollingChildHelper(c.getFlingLayout()); }