Home
last modified time | relevance | path

Searched refs:velocityX (Results 1 – 25 of 32) 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()
358 mDismissAnimationHelper.animateRestore(mViewHolder, velocityX); in onTouchEvent()
421 float velocityX = getLastComputedXVelocity(); in isTargetSwipedFastEnough() local
428 boolean isFastEnough = (Math.abs(velocityX) > minVelocity); in isTargetSwipedFastEnough()
429 boolean isIntentional = (Math.abs(velocityX) > Math.abs(velocityY)); in isTargetSwipedFastEnough()
430 boolean isSameDirection = (velocityX > 0) == (translationX > 0); in isTargetSwipedFastEnough()
450 float velocityX = getLastComputedXVelocity(); in isTargetSwipedFarEnough() local
455 boolean isVelocityHighEnough = (Math.abs(velocityX) > mMinVelocityForSwipeDirection); in isTargetSwipedFarEnough()
[all …]
DDismissAnimationHelper.java91 float velocityX) { in animateDismiss() argument
93 Log.d(TAG, "animateDismiss direction=" + swipeDirection + " velocityX=" + velocityX); in animateDismiss()
111 void animateRestore(CarNotificationBaseViewHolder viewHolder, float velocityX) { in animateRestore() argument
113 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.java1161 int velocityX = (int) velocityTracker.getXVelocity(mActivePointerId); in onTouchEvent() local
1168 boolean isFling = mTotalMotionX > mTouchSlop && shouldFlingForVelocity(velocityX); in onTouchEvent()
1170 boolean isVelocityXLeft = mIsRtl ? velocityX > 0 : velocityX < 0; in onTouchEvent()
1178 Math.signum(velocityX) != Math.signum(deltaX) && isFling) { in onTouchEvent()
1190 snapToPageWithVelocity(finalPage, velocityX); in onTouchEvent()
1195 snapToPageWithVelocity(finalPage, velocityX); in onTouchEvent()
1212 mScroller.fling(initialScrollX, -velocityX, in onTouchEvent()
1267 protected boolean shouldFlingForVelocity(int velocityX) { in shouldFlingForVelocity() argument
1268 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()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/
DOverviewWithoutFocusInputConsumer.java128 float velocityX = mVelocityTracker.getXVelocity(); in finishTouchTracking() local
131 ? -velocityX : (mNavBarPosition.isLeftEdge() ? velocityX : -velocityY); in finishTouchTracking()
DAssistantTouchConsumer.java272 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument
273 if (isValidAssistantGestureAngle(velocityX, -velocityY) in onFling()
278 (float) Math.sqrt(velocityX * velocityX + velocityY * velocityY)); in onFling()
DOtherActivityInputConsumer.java375 float velocityX = mVelocityTracker.getXVelocity(mActivePointerId); in finishTouchTracking() local
377 float velocity = mNavBarPosition.isRightEdge() ? velocityX in finishTouchTracking()
378 : mNavBarPosition.isLeftEdge() ? -velocityX in finishTouchTracking()
382 mInteractionHandler.onGestureEnded(velocity, new PointF(velocityX, velocityY), in finishTouchTracking()
DFallbackNoButtonInputConsumer.java260 float velocityX = mVelocityTracker.getXVelocity(mActivePointerId); in finishTouchTracking() local
262 float velocity = mNavBarPosition.isRightEdge() ? velocityX in finishTouchTracking()
263 : mNavBarPosition.isLeftEdge() ? -velocityX in finishTouchTracking()
/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.java459 float velocityX, float velocityY) { in initGestureDetector()
461 final float absX = Math.abs(velocityX); in initGestureDetector()
471 if (velocityX > mSwipeThreshold && absY < absX && deltaX > travelX) { in initGestureDetector()
472 if (mDisambiguateSwipe && endingVelocityX < velocityX / 4) { in initGestureDetector()
478 } else if (velocityX < -mSwipeThreshold && absY < absX && deltaX < -travelX) { in initGestureDetector()
479 if (mDisambiguateSwipe && endingVelocityX > velocityX / 4) { in initGestureDetector()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DTwoPaneLayout.java515 public void onDragEnded(float deltaX, float velocityX, boolean isFling) { in onDragEnded() argument
519 mController.onDrawerDragEnded(velocityX >= 0); in onDragEnded()
521 mController.onDrawerDragEnded(velocityX < 0); in onDragEnded()
DGmailDragHelper.java77 public void onDragEnded(float deltaX, float velocityX, boolean isFling); in onDragEnded() argument
/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/Gallery2/src/com/android/gallery3d/filtershow/editors/
DSwapButton.java86 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { in onFling() argument

12