Home
last modified time | relevance | path

Searched refs:velocityX (Results 1 – 25 of 30) sorted by relevance

12

/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/
DConversationListSwipeHelper.java191 final float velocityX = getLastComputedXVelocity(); in onTouchEvent() local
199 } else if (velocityX != 0) { in onTouchEvent()
201 velocityX > 0 ? SWIPE_DIRECTION_RIGHT : SWIPE_DIRECTION_LEFT; in onTouchEvent()
211 animateDismiss(mListItemView, velocityX); in onTouchEvent()
216 animateRestore(mListItemView, velocityX); in onTouchEvent()
317 private void animateDismiss(final ConversationListItemView itemView, final float velocityX) { in animateDismiss() argument
318 Assert.isTrue(velocityX != 0); in animateDismiss()
319 final int direction = velocityX > 0 ? SWIPE_DIRECTION_RIGHT : SWIPE_DIRECTION_LEFT; in animateDismiss()
320 animateDismiss(itemView, direction, velocityX); in animateDismiss()
334 final int swipeDirection, final float velocityX) { in animateDismiss() argument
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/
DCarNotificationItemTouchListener.java330 float velocityX = getLastComputedXVelocity(); in onTouchEvent() local
341 } else if (velocityX != 0) { in onTouchEvent()
343 (velocityX > 0) in onTouchEvent()
354 mDismissAnimationHelper.animateRestore(mViewHolder, velocityX); in onTouchEvent()
413 float velocityX = getLastComputedXVelocity(); in isTargetSwipedFastEnough() local
420 boolean isFastEnough = (Math.abs(velocityX) > minVelocity); in isTargetSwipedFastEnough()
421 boolean isIntentional = (Math.abs(velocityX) > Math.abs(velocityY)); in isTargetSwipedFastEnough()
422 boolean isSameDirection = (velocityX > 0) == (translationX > 0); in isTargetSwipedFastEnough()
442 float velocityX = getLastComputedXVelocity(); in isTargetSwipedFarEnough() local
447 boolean isVelocityHighEnough = (Math.abs(velocityX) > mMinVelocityForSwipeDirection); in isTargetSwipedFarEnough()
[all …]
DDismissAnimationHelper.java93 float velocityX) { in animateDismiss() argument
95 Log.d(TAG, "animateDismiss direction=" + swipeDirection + " velocityX=" + velocityX); in animateDismiss()
113 void animateRestore(CarNotificationBaseViewHolder viewHolder, float velocityX) { in animateRestore() argument
115 Log.d(TAG, "animateRestore velocityX=" + velocityX); in animateRestore()
DHeadsUpNotificationOnTouchListener.java95 float velocityX = mVelocityTracker.getXVelocity(); in onTouch() local
96 float absVelocityX = Math.abs(velocityX); in onTouch()
109 dismiss = (velocityX < 0) == (deltaX < 0); in onTouch()
/packages/apps/Camera2/src/com/android/camera/widget/
DFilmstripLayout.java410 private boolean flingShouldOpenFilmstrip(float velocityX) { in flingShouldOpenFilmstrip() argument
412 (velocityX < 0.0f) && in flingShouldOpenFilmstrip()
413 (Math.abs(velocityX / 1000.0f) > FLING_VELOCITY_THRESHOLD); in flingShouldOpenFilmstrip()
417 public boolean onFling(float velocityX, float velocityY) { in onFling() argument
419 return mFilmstripGestureListener.onFling(velocityX, velocityY); in onFling()
420 } else if (flingShouldOpenFilmstrip(velocityX)) { in onFling()
DFilmstripView.java2165 public void fling(float velocityX) {
2174 float scaledVelocityX = velocityX / mScale;
2189 mScrollGesture.fling(mCenterX, 0, (int) -velocityX, 0, minX, maxX, 0, 0);
2192 void flingInsideZoomView(float velocityX, float velocityY) {
2218 final float velocity = Math.max(Math.abs(velocityX), Math.abs(velocityY));
2227 translationX + duration / factor * velocityX);
2564 int velocityX, int velocityY,
2567 mScroller.fling(startX, startY, velocityX, velocityY, minX, maxX, minY, maxY);
2857 public boolean onFling(float velocityX, float velocityY) {
2865 mController.flingInsideZoomView(velocityX, velocityY);
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DScroller.java366 public void fling(int startX, int startY, int velocityX, int velocityY, in fling() argument
381 if (Math.signum(velocityX) == Math.signum(oldVelocityX) && in fling()
383 velocityX += oldVelocityX; in fling()
391 float velocity = (float) Math.hypot(velocityX, velocityY); in fling()
400 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling()
DOverScroller.java400 public void fling(int startX, int startY, int velocityX, int velocityY, in fling() argument
402 fling(startX, startY, velocityX, velocityY, minX, maxX, minY, maxY, 0, 0); in fling()
432 public void fling(int startX, int startY, int velocityX, int velocityY, in fling() argument
438 if (Math.signum(velocityX) == Math.signum(oldVelocityX) && in fling()
440 velocityX += oldVelocityX; in fling()
446 mScrollerX.fling(startX, velocityX, minX, maxX, overX); in fling()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java1169 int velocityX = (int) velocityTracker.getXVelocity(mActivePointerId); in onTouchEvent() local
1176 boolean isFling = mTotalMotionX > mTouchSlop && shouldFlingForVelocity(velocityX); in onTouchEvent()
1178 boolean isVelocityXLeft = mIsRtl ? velocityX > 0 : velocityX < 0; in onTouchEvent()
1186 Math.signum(velocityX) != Math.signum(deltaX) && isFling) { in onTouchEvent()
1198 snapToPageWithVelocity(finalPage, velocityX); in onTouchEvent()
1203 snapToPageWithVelocity(finalPage, velocityX); in onTouchEvent()
1220 mScroller.fling(initialScrollX, -velocityX, in onTouchEvent()
1275 protected boolean shouldFlingForVelocity(int velocityX) { in shouldFlingForVelocity() argument
1276 return Math.abs(velocityX) > mFlingThresholdVelocity; in shouldFlingForVelocity()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DFlingScroller.java76 public void fling(int startX, int startY, int velocityX, int velocityY, in fling() argument
85 double velocity = Math.hypot(velocityX, velocityY); in fling()
87 mCosAngle = velocityX / velocity; in fling()
DGestureRecognizer.java35 boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY); in onFling() argument
95 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, in onFling() argument
97 return mListener.onFling(e1, e2, velocityX, velocityY); in onFling()
DPhotoView.java1079 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
1082 if (swipeImages(velocityX, velocityY)) { in onFling()
1085 flingImages(velocityX, velocityY, Math.abs(e2.getY() - e1.getY())); in onFling()
1091 private boolean flingImages(float velocityX, float velocityY, float dY) { in flingImages() argument
1092 int vx = (int) (velocityX + 0.5f); in flingImages()
1097 if (Math.abs(velocityX) > Math.abs(velocityY)) { in flingImages()
1551 private boolean swipeImages(float velocityX, float velocityY) {
1559 if (!isMinimal && Math.abs(velocityY) > Math.abs(velocityX))
1566 if (velocityX < -SWIPE_THRESHOLD && (isMinimal
1569 } else if (velocityX > SWIPE_THRESHOLD && (isMinimal
DPositionController.java659 public boolean flingPage(int velocityX, int velocityY) { in flingPage() argument
672 if ((velocityX > 0 && (edges & IMAGE_AT_LEFT_EDGE) != 0) || in flingPage()
673 (velocityX < 0 && (edges & IMAGE_AT_RIGHT_EDGE) != 0)) { in flingPage()
674 velocityX = 0; in flingPage()
681 if (velocityX == 0 && velocityY == 0) return false; in flingPage()
683 mPageScroller.fling(p.mCurrentX, b.mCurrentY, velocityX, velocityY, in flingPage()
691 public boolean flingFilmX(int velocityX) { in flingFilmX() argument
692 if (velocityX == 0) return false; in flingFilmX()
704 mFilmScroller.fling(p.mCurrentX, 0, velocityX, 0, in flingFilmX()
DSlotView.java659 MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
663 float velocity = WIDE ? velocityX : velocityY; in onFling()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/
DAssistantTouchConsumer.java277 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
279 && isValidAssistantGestureAngle(velocityX, -velocityY) in onFling()
286 (float) Math.sqrt(velocityX * velocityX + velocityY * velocityY)); in onFling()
DOverviewWithoutFocusInputConsumer.java131 float velocityX = mVelocityTracker.getXVelocity(); in finishTouchTracking() local
134 ? -velocityX : (mNavBarPosition.isLeftEdge() ? velocityX : -velocityY); in finishTouchTracking()
DOtherActivityInputConsumer.java365 float velocityX = mVelocityTracker.getXVelocity(mActivePointerId);
367 float velocity = mNavBarPosition.isRightEdge() ? velocityX
368 : mNavBarPosition.isLeftEdge() ? -velocityX
372 mInteractionHandler.onGestureEnded(velocity, new PointF(velocityX, velocityY),
/packages/apps/Camera2/src/com/android/camera/ui/
DFilmstripGestureRecognizer.java39 boolean onFling(float velocityX, float velocityY); in onFling() argument
101 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, in onFling() argument
103 return mListener.onFling(velocityX, velocityY); in onFling()
DModeListView.java316 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
1052 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
1054 mVelocityX = velocityX / 1000f * SCROLL_FACTOR;
1055 mCurrentStateManager.getCurrentState().onFling(e1, e2, velocityX, velocityY);
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/widget/
DPagedSnapHelper.java200 public int[] calculateScrollDistance(int velocityX, int velocityY) { in calculateScrollDistance() argument
201 int[] outDist = super.calculateScrollDistance(velocityX, velocityY); in calculateScrollDistance()
/packages/apps/Car/LatinIME/src/com/android/inputmethod/latin/car/
DKeyboardView.java462 float velocityX, float velocityY) { in initGestureDetector()
464 final float absX = Math.abs(velocityX); in initGestureDetector()
474 if (velocityX > mSwipeThreshold && absY < absX && deltaX > travelX) { in initGestureDetector()
475 if (mDisambiguateSwipe && endingVelocityX < velocityX / 4) { in initGestureDetector()
481 } else if (velocityX < -mSwipeThreshold && absY < absX && deltaX < -travelX) { in initGestureDetector()
482 if (mDisambiguateSwipe && endingVelocityX > velocityX / 4) { in initGestureDetector()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
DScrollController.java813 float velocityX = velocity * curDx / hyp; in startScroll() local
815 int durationX = velocityX ==0 ? 0 : (int)((Math.abs(dx) * 1000) / velocityX); in startScroll()
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/recyclerview/
DCarUiSnapHelper.java407 public int[] calculateScrollDistance(int velocityX, int velocityY) { in calculateScrollDistance() argument
408 int[] outDist = super.calculateScrollDistance(velocityX, velocityY); in calculateScrollDistance()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/editors/
DSwapButton.java86 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/emoji/
DEmojiPageKeyboardView.java223 public boolean onFling(final MotionEvent e1, final MotionEvent e2, final float velocityX, in onFling() argument

12