Lines Matching refs:dx

171          * @param dx Change in X position from the last call
174 public void onViewPositionChanged(@NonNull View changedView, int left, int top, @Px int dx,
306 * @param dx Proposed change in position for left
309 public int clampViewPositionHorizontal(@NonNull View child, int left, int dx) {
599 final int dx = finalLeft - startLeft;
602 if (dx == 0 && dy == 0) {
609 final int duration = computeSettleDuration(mCapturedView, dx, dy, xvel, yvel);
610 mScroller.startScroll(startLeft, startTop, dx, dy, duration);
616 private int computeSettleDuration(View child, int dx, int dy, int xvel, int yvel) {
619 final int absDx = Math.abs(dx);
631 int xduration = computeAxisDuration(dx, xvel, mCallback.getViewHorizontalDragRange(child));
739 final int dx = x - mCapturedView.getLeft();
742 if (dx != 0) {
743 ViewCompat.offsetLeftAndRight(mCapturedView, dx);
749 if (dx != 0 || dy != 0) {
750 mCallback.onViewPositionChanged(mCapturedView, x, y, dx, dy);
921 * Tests scrollability within child views of v given a delta of dx.
926 * @param dx Delta scrolled in pixels along the X axis
930 * @return true if child views of v can be scrolled by delta of dx.
932 protected boolean canScroll(@NonNull View v, boolean checkV, int dx, int dy, int x, int y) {
945 && canScroll(child, true, dx, dy, x + scrollX - child.getLeft(),
952 return checkV && (v.canScrollHorizontally(-dx) || v.canScrollVertically(-dy));
1034 final float dx = x - mInitialMotionX[pointerId];
1038 final boolean pastSlop = toCapture != null && checkTouchSlop(toCapture, dx, dy);
1046 final int targetLeft = oldLeft + (int) dx;
1048 targetLeft, (int) dx);
1060 reportNewEdgeDrags(dx, dy, pointerId);
1185 final float dx = x - mInitialMotionX[pointerId];
1188 reportNewEdgeDrags(dx, dy, pointerId);
1195 if (checkTouchSlop(toCapture, dx, dy)
1254 private void reportNewEdgeDrags(float dx, float dy, int pointerId) {
1256 if (checkNewEdgeDrag(dx, dy, pointerId, EDGE_LEFT)) {
1259 if (checkNewEdgeDrag(dy, dx, pointerId, EDGE_TOP)) {
1262 if (checkNewEdgeDrag(dx, dy, pointerId, EDGE_RIGHT)) {
1265 if (checkNewEdgeDrag(dy, dx, pointerId, EDGE_BOTTOM)) {
1298 * @param dx Motion since initial position along X axis
1302 private boolean checkTouchSlop(View child, float dx, float dy) {
1310 return dx * dx + dy * dy > mTouchSlop * mTouchSlop;
1312 return Math.abs(dx) > mTouchSlop;
1366 final float dx = mLastMotionX[pointerId] - mInitialMotionX[pointerId];
1370 return dx * dx + dy * dy > mTouchSlop * mTouchSlop;
1372 return Math.abs(dx) > mTouchSlop;
1423 private void dragTo(int left, int top, int dx, int dy) {
1428 if (dx != 0) {
1429 clampedX = mCallback.clampViewPositionHorizontal(mCapturedView, left, dx);
1437 if (dx != 0 || dy != 0) {