Home
last modified time | relevance | path

Searched refs:velocity (Results 1 – 25 of 56) sorted by relevance

123

/packages/apps/Launcher3/src/com/android/launcher3/util/
DOverScroller.java274 public void startScrollSpring(int start, int delta, int duration, float velocity) { in startScrollSpring() argument
277 mScroller.startScroll(start, delta, duration, velocity); in startScrollSpring()
294 public void fling(int start, int velocity, int min, int max) { in fling() argument
295 fling(start, velocity, min, max, 0); in fling()
313 public void fling(int start, int velocity, int min, int max, int over) { in fling() argument
317 if (Math.signum(velocity) == Math.signum(oldVelocityX)) { in fling()
318 velocity += oldVelocityX; in fling()
323 mScroller.fling(start, velocity, min, max, over); in fling()
521 static private float getDeceleration(int velocity) { in getDeceleration() argument
522 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration()
[all …]
/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/
DFlingAnimationUtils.java64 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument
65 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
78 ViewPropertyAnimator animator, float currValue, float endValue, float velocity) { in apply() argument
79 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
94 Animator animator, float currValue, float endValue, float velocity, float maxDistance) { in apply() argument
95 AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); in apply()
115 float velocity, in apply() argument
117 AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); in apply()
123 float currValue, float endValue, float velocity, float maxDistance) { in getProperties() argument
127 float velAbs = Math.abs(velocity); in getProperties()
[all …]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DOverScroller.java659 static private float getDeceleration(int velocity) { in getDeceleration() argument
660 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration()
734 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument
748 void fling(int start, int velocity, int min, int max, int over) { in fling() argument
751 mCurrVelocity = mVelocity = velocity; in fling()
757 startAfterEdge(start, min, max, velocity); in fling()
764 if (velocity != 0) { in fling()
765 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling()
766 totalDistance = getSplineFlingDistance(velocity); in fling()
769 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling()
[all …]
DScroller.java391 float velocity = (float) Math.hypot(velocityX, velocityY); in fling() local
393 mVelocity = velocity; in fling()
394 final double l = Math.log(START_TENSION * velocity / ALPHA); in fling()
400 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling()
401 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/
DNoButtonQuickSwitchTouchController.java323 public void onDragEnd(PointF velocity) { in onDragEnd() argument
324 boolean horizontalFling = mSwipeDetector.isFling(velocity.x); in onDragEnd()
325 boolean verticalFling = mSwipeDetector.isFling(velocity.y); in onDragEnd()
345 if (velocity.x < 0) { in onDragEnd()
349 if (velocity.y > 0) { in onDragEnd()
355 targetState = Math.abs(velocity.x) > Math.abs(velocity.y) in onDragEnd()
360 targetState = velocity.x > 0 ? QUICK_SWITCH : NORMAL; in onDragEnd()
362 targetState = velocity.y > 0 ? QUICK_SWITCH : NORMAL; in onDragEnd()
373 + velocity.x * getSingleFrameMs(mLauncher) / mXRange, 0f, 1f); in onDragEnd()
375 long xDuration = BaseSwipeDetector.calculateDuration(velocity.x, in onDragEnd()
[all …]
DTaskViewTouchController.java249 public void onDragEnd(float velocity) {
250 boolean fling = mDetector.isFling(velocity);
261 boolean goingUp = velocity < 0;
268 velocity, goingToEnd ? (1 - progress) : progress);
270 animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity);
274 + velocity * getSingleFrameMs(mActivity) / Math.abs(mEndDisplacement), 0f, 1f);
281 anim.setInterpolator(scrollInterpolatorForVelocity(velocity));
290 mCurrentAnimation.dispatchOnStartWithVelocity(goingToEnd ? 1f : 0f, velocity);
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DBaseSwipeDetector.java74 public static long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument
76 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration()
81 "calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration()
116 public boolean isFling(float velocity) { in isFling() argument
117 return Math.abs(velocity) > RELEASE_VELOCITY_PX_MS; in isFling()
254 PointF velocity = new PointF(mVelocityTracker.getXVelocity() / 1000, in reportDragEnd() local
257 velocity.x = -velocity.x; in reportDragEnd()
261 mDisplacement, velocity)); in reportDragEnd()
264 reportDragEndInternal(velocity); in reportDragEnd()
267 protected abstract void reportDragEndInternal(PointF velocity); in reportDragEndInternal() argument
DAbstractStateChangeTouchController.java372 public void onDragEnd(float velocity) { in onDragEnd() argument
373 boolean fling = mDetector.isFling(velocity); in onDragEnd()
386 Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0 in onDragEnd()
400 ? LauncherAnimUtils.blockedFlingDurationFactor(velocity) : 1; in onDragEnd()
409 + velocity * getSingleFrameMs(mLauncher) * mProgressMultiplier, 0f, 1f); in onDragEnd()
410 duration = BaseSwipeDetector.calculateDuration(velocity, in onDragEnd()
424 + velocity * getSingleFrameMs(mLauncher) * mProgressMultiplier, 0f, 1f); in onDragEnd()
425 duration = BaseSwipeDetector.calculateDuration(velocity, in onDragEnd()
435 targetState, velocity, fling); in onDragEnd()
436 mCurrentAnimation.dispatchOnStartWithVelocity(endProgress, velocity); in onDragEnd()
[all …]
DBothAxesSwipeDetector.java86 protected void reportDragEndInternal(PointF velocity) { in reportDragEndInternal() argument
87 mListener.onDragEnd(velocity); in reportDragEndInternal()
97 void onDragEnd(PointF velocity); in onDragEnd() argument
DSingleAxisSwipeDetector.java157 protected void reportDragEndInternal(PointF velocity) { in reportDragEndInternal() argument
158 float velocityComponent = mDir.extractDirection(velocity); in reportDragEndInternal()
174 void onDragEnd(float velocity); in onDragEnd() argument
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPaper.java45 public void edgeReached(float velocity) { in edgeReached() argument
46 velocity /= mWidth; // make it relative to width in edgeReached()
47 if (velocity < 0) { in edgeReached()
48 mAnimationRight.onAbsorb(-velocity); in edgeReached()
50 mAnimationLeft.onAbsorb(velocity); in edgeReached()
145 public void onAbsorb(float velocity) { in onAbsorb() argument
146 float finish = Utils.clamp(mValue + velocity * VELOCITY_FACTOR, in onAbsorb()
DEdgeEffect.java264 public void onAbsorb(int velocity) { in onAbsorb() argument
266 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity)); in onAbsorb()
269 mDuration = 0.1f + (velocity * 0.03f); in onAbsorb()
282 mEdgeAlphaFinish = Math.max(0, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1)); in onAbsorb()
285 HELD_EDGE_SCALE_Y, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1.f)); in onAbsorb()
291 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f), 1.75f); in onAbsorb()
294 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
DFlingScroller.java85 double velocity = Math.hypot(velocityX, velocityY); in fling() local
86 mSinAngle = velocityY / velocity; in fling()
87 mCosAngle = velocityX / velocity; in fling()
97 * Math.pow(Math.abs(velocity), 1.0 / (DECELERATED_FACTOR - 1))); in fling()
101 velocity * mDuration / DECELERATED_FACTOR / 1000); in fling()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DMotionPauseDetector.java118 float velocity = changeInPosition / changeInTime; in addPosition() local
120 checkMotionPaused(velocity, mPreviousVelocity, time); in addPosition()
122 mPreviousVelocity = velocity; in addPosition()
128 private void checkMotionPaused(float velocity, float prevVelocity, long time) { in checkMotionPaused() argument
129 float speed = Math.abs(velocity); in checkMotionPaused()
136 if (velocity < 0 != prevVelocity < 0) { in checkMotionPaused()
/packages/apps/Launcher3/src/com/android/launcher3/views/
DSpringRelativeLayout.java126 private void finishScrollWithVelocity(float velocity) { in finishScrollWithVelocity() argument
127 mSpring.setStartVelocity(velocity); in finishScrollWithVelocity()
132 protected void finishWithShiftAndVelocity(float shift, float velocity, in finishWithShiftAndVelocity() argument
136 finishScrollWithVelocity(velocity); in finishWithShiftAndVelocity()
174 public void onAbsorb(int velocity) { in onAbsorb() argument
175 finishScrollWithVelocity(velocity * mVelocityMultiplier); in onAbsorb()
DAbstractSlideInView.java141 public void onDragEnd(float velocity) { in onDragEnd() argument
142 if ((mSwipeDetector.isFling(velocity) && velocity > 0) || mTranslationShift > 0.5f) { in onDragEnd()
143 mScrollInterpolator = scrollInterpolatorForVelocity(velocity); in onDragEnd()
145 velocity, TRANSLATION_SHIFT_CLOSED - mTranslationShift)); in onDragEnd()
151 BaseSwipeDetector.calculateDuration(velocity, mTranslationShift)) in onDragEnd()
/packages/apps/Launcher3/src/com/android/launcher3/notification/
DNotificationMainView.java191 public void onDragEnd(float velocity) { in onDragEnd() argument
199 } else if (mSwipeDetector.isFling(velocity)) { in onDragEnd()
201 endTranslation = velocity < 0 ? - getWidth() : getWidth(); in onDragEnd()
210 long duration = BaseSwipeDetector.calculateDuration(velocity, in onDragEnd()
215 .setInterpolator(scrollInterpolatorForVelocity(velocity)); in onDragEnd()
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/
DWindowTransformSwipeHandler.java655 public void onGestureEnded(float endVelocity, PointF velocity, PointF downPos) { in onGestureEnded() argument
662 boolean isVelocityVertical = Math.abs(velocity.y) > Math.abs(velocity.x); in onGestureEnded()
664 mLogDirection = velocity.y < 0 ? Direction.UP : Direction.DOWN; in onGestureEnded()
666 mLogDirection = velocity.x < 0 ? Direction.LEFT : Direction.RIGHT; in onGestureEnded()
669 handleNormalGestureEnd(endVelocity, isFling, velocity, false /* isCancel */); in onGestureEnded()
696 private GestureEndTarget calculateEndTarget(PointF velocity, float endVelocity, boolean isFling,
736 goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
760 private void handleNormalGestureEnd(float endVelocity, boolean isFling, PointF velocity, in handleNormalGestureEnd() argument
762 PointF velocityPxPerMs = new PointF(velocity.x / 1000, velocity.y / 1000); in handleNormalGestureEnd()
765 final GestureEndTarget endTarget = calculateEndTarget(velocity, endVelocity, in handleNormalGestureEnd()
/packages/apps/Launcher3/src/com/android/launcher3/anim/
DInterpolators.java131 public static Interpolator scrollInterpolatorForVelocity(float velocity) { in scrollInterpolatorForVelocity() argument
132 return Math.abs(velocity) > FAST_FLING_PX_MS ? SCROLL : SCROLL_CUBIC; in scrollInterpolatorForVelocity()
139 public static Interpolator overshootInterpolatorForVelocity(float velocity) { in overshootInterpolatorForVelocity() argument
140 return new OvershootInterpolator(Math.min(Math.abs(velocity), 3f)); in overshootInterpolatorForVelocity()
DSpringObjectAnimator.java99 mSpring.addUpdateListener((animation, value, velocity) -> { in SpringObjectAnimator() argument
103 mSpring.addEndListener((animation, canceled, value, velocity) -> { in SpringObjectAnimator() argument
131 public void startSpring(float end, float velocity, OnAnimationEndListener endListener) { in startSpring() argument
140 mSpring.setStartVelocity(velocity); in startSpring()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/
DPortraitStatesTouchController.java273 LauncherState targetState, float velocity, boolean isFling) { in updateSwipeCompleteAnimation() argument
275 velocity, isFling); in updateSwipeCompleteAnimation()
276 handleFirstSwipeToOverview(animator, expectedDuration, targetState, velocity, isFling); in updateSwipeCompleteAnimation()
280 final long expectedDuration, final LauncherState targetState, final float velocity, in handleFirstSwipeToOverview() argument
291 Interpolators.overshootInterpolatorForVelocity(velocity), currFraction, 1); in handleFirstSwipeToOverview()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/answermethod/
DFlingUpDownTouchHandler.java394 private void fling(float velocity, @FlingTarget int target, boolean centerBecauseOfFalsing) { in fling() argument
397 flingAnimationUtils.apply(animator, currentProgress, target, velocity); in fling()
399 flingAnimationUtils.applyDismissing(animator, currentProgress, target, velocity, 1); in fling()
402 velocity = 0; in fling()
404 if (velocity == 0) { in fling()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java1426 protected boolean snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument
1434 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity()
1448 velocity = Math.abs(velocity); in snapToPageWithVelocity()
1449 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity()
1454 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity()
1458 velocity * Math.signum(newX - getUnboundedScrollX()), true); in snapToPageWithVelocity()
1494 TimeInterpolator interpolator, float velocity, boolean spring) { in snapToPage() argument
1531 mScroller.startScrollSpring(getUnboundedScrollX(), delta, duration, velocity); in snapToPage() local
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/
DOverviewWithoutFocusInputConsumer.java133 float velocity = mNavBarPosition.isRightEdge() in finishTouchTracking() local
138 if (Math.abs(velocity) >= ViewConfiguration.get(mContext).getScaledMinimumFlingVelocity()) { in finishTouchTracking()
139 triggerQuickstep = velocity > 0; in finishTouchTracking()
/packages/apps/Contacts/src/com/android/contacts/widget/
DMultiShrinkScroller.java598 final float velocity = getCurrentVelocity(); in stopDrag() local
599 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { in stopDrag()
600 fling(-velocity); in stopDrag()
946 private void fling(float velocity) { in fling() argument
949 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, in fling()
951 if (velocity < 0 && mTransparentView.getHeight() <= 0) { in fling()

123