/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | OverScroller.java | 274 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/ |
D | FlingAnimationUtils.java | 64 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/ |
D | OverScroller.java | 659 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 …]
|
D | Scroller.java | 391 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/UnifiedEmail/src/com/android/mail/ui/ |
D | SwipeHelper.java | 266 private void dismissChild(final SwipeableItemView view, float velocity) { in dismissChild() argument 269 float newPos = determinePos(animView, velocity); in dismissChild() 270 int duration = determineDuration(animView, newPos, velocity); in dismissChild() 293 private static int determineDuration(View animView, float newPos, float velocity) { in determineDuration() argument 295 if (velocity != 0) { in determineDuration() 299 .abs(velocity))); in determineDuration() 306 private float determinePos(View animView, float velocity) { in determinePos() argument 308 if (velocity < 0 || (velocity == 0 && animView.getTranslationX() < 0) in determinePos() 310 || (velocity == 0 && animView.getTranslationX() == 0 && mSwipeDirection == Y)) { in determinePos() 406 float velocity = getVelocity(mVelocityTracker); in onTouchEvent() local [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
D | SwipeDetector.java | 133 float velocity = tracker.getXVelocity(); 135 velocity = -velocity; 137 return velocity; 245 void onDragEnd(float velocity, boolean fling); in onDragEnd() argument 405 float velocity = mDir.getVelocity(mVelocityTracker, mIsRtl) / 1000; in reportDragEnd() local 408 mDisplacement, velocity)); in reportDragEnd() 411 mListener.onDragEnd(velocity, Math.abs(velocity) > RELEASE_VELOCITY_PX_MS); in reportDragEnd() 414 public static long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument 416 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration() 420 … Log.d(TAG, String.format("calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration()
|
D | AbstractStateChangeTouchController.java | 378 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 394 Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0 in onDragEnd() 408 ? LauncherAnimUtils.blockedFlingDurationFactor(velocity) : 1; in onDragEnd() 417 progress + velocity * SINGLE_FRAME_MS * mProgressMultiplier, 0f, 1f); in onDragEnd() 418 duration = SwipeDetector.calculateDuration(velocity, in onDragEnd() 435 progress + velocity * SINGLE_FRAME_MS * mProgressMultiplier, 0f, 1f); in onDragEnd() 436 duration = SwipeDetector.calculateDuration(velocity, in onDragEnd() 446 targetState, velocity, fling); in onDragEnd() 447 mCurrentAnimation.dispatchOnStartWithVelocity(endProgress, velocity); in onDragEnd() 449 mLauncher.getAppsView().addSpringFromFlingUpdateListener(anim, velocity); in onDragEnd() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | Paper.java | 45 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()
|
D | EdgeEffect.java | 264 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()
|
D | FlingScroller.java | 85 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()
|
D | ScrollerHelper.java | 74 public void fling(int velocity, int min, int max) { in fling() argument 78 velocity, 0, // velocityX, velocityY in fling()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | MotionPauseDetector.java | 118 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/ |
D | SpringRelativeLayout.java | 126 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()
|
D | AbstractSlideInView.java | 139 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 140 if ((fling && velocity > 0) || mTranslationShift > 0.5f) { in onDragEnd() 141 mScrollInterpolator = scrollInterpolatorForVelocity(velocity); in onDragEnd() 143 velocity, TRANSLATION_SHIFT_CLOSED - mTranslationShift)); in onDragEnd() 149 SwipeDetector.calculateDuration(velocity, mTranslationShift)) in onDragEnd()
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/ |
D | TaskViewTouchController.java | 246 public void onDragEnd(float velocity, boolean fling) { 257 boolean goingUp = velocity < 0; 264 velocity, goingToEnd ? (1 - progress) : progress); 266 animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity); 270 progress + velocity * SINGLE_FRAME_MS / Math.abs(mEndDisplacement), 0f, 1f); 277 anim.setInterpolator(scrollInterpolatorForVelocity(velocity)); 286 mCurrentAnimation.dispatchOnStartWithVelocity(goingToEnd ? 1f : 0f, velocity);
|
/packages/apps/Launcher3/src/com/android/launcher3/anim/ |
D | Interpolators.java | 128 public static Interpolator scrollInterpolatorForVelocity(float velocity) { in scrollInterpolatorForVelocity() argument 129 return Math.abs(velocity) > FAST_FLING_PX_MS ? SCROLL : SCROLL_CUBIC; in scrollInterpolatorForVelocity() 136 public static Interpolator overshootInterpolatorForVelocity(float velocity) { in overshootInterpolatorForVelocity() argument 137 return new OvershootInterpolator(Math.min(Math.abs(velocity), 3f)); in overshootInterpolatorForVelocity()
|
D | SpringObjectAnimator.java | 99 mSpring.addUpdateListener((animation, value, velocity) -> mSpringEnded = false); in SpringObjectAnimator() 100 mSpring.addEndListener((animation, canceled, value, velocity) -> { in SpringObjectAnimator() argument 128 public void startSpring(float end, float velocity, OnAnimationEndListener endListener) { in startSpring() argument 137 mSpring.setStartVelocity(velocity); in startSpring()
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/ |
D | WindowTransformSwipeHandler.java | 855 public void onGestureEnded(float endVelocity, PointF velocity, PointF downPos) { in onGestureEnded() argument 862 boolean isVelocityVertical = Math.abs(velocity.y) > Math.abs(velocity.x); in onGestureEnded() 864 mLogDirection = velocity.y < 0 ? Direction.UP : Direction.DOWN; in onGestureEnded() 866 mLogDirection = velocity.x < 0 ? Direction.LEFT : Direction.RIGHT; in onGestureEnded() 869 handleNormalGestureEnd(endVelocity, isFling, velocity, false /* isCancel */); in onGestureEnded() 892 private GestureEndTarget calculateEndTarget(PointF velocity, float endVelocity, boolean isFling, 931 endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity) 938 endTarget = goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity) 955 private void handleNormalGestureEnd(float endVelocity, boolean isFling, PointF velocity, in handleNormalGestureEnd() argument 957 PointF velocityPxPerMs = new PointF(velocity.x / 1000, velocity.y / 1000); in handleNormalGestureEnd() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/ |
D | PortraitStatesTouchController.java | 256 LauncherState targetState, float velocity, boolean isFling) { in updateSwipeCompleteAnimation() argument 258 velocity, isFling); in updateSwipeCompleteAnimation() 259 handleFirstSwipeToOverview(animator, expectedDuration, targetState, velocity, isFling); in updateSwipeCompleteAnimation() 263 final long expectedDuration, final LauncherState targetState, final float velocity, in handleFirstSwipeToOverview() argument 274 Interpolators.overshootInterpolatorForVelocity(velocity), currFraction, 1); in handleFirstSwipeToOverview()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/answermethod/ |
D | FlingUpDownTouchHandler.java | 394 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/notification/ |
D | NotificationMainView.java | 190 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 200 endTranslation = velocity < 0 ? - getWidth() : getWidth(); in onDragEnd() 209 long duration = SwipeDetector.calculateDuration(velocity, in onDragEnd() 214 .setInterpolator(scrollInterpolatorForVelocity(velocity)); in onDragEnd()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | PagedView.java | 1407 protected boolean snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 1415 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity() 1429 velocity = Math.abs(velocity); in snapToPageWithVelocity() 1430 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity() 1435 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity() 1439 velocity * Math.signum(newX - getUnboundedScrollX()), true); in snapToPageWithVelocity() 1475 TimeInterpolator interpolator, float velocity, boolean spring) { in snapToPage() argument 1512 mScroller.startScrollSpring(getUnboundedScrollX(), delta, duration, velocity); in snapToPage() local
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ |
D | OverviewWithoutFocusInputConsumer.java | 130 float velocity = mNavBarPosition.isRightEdge() in finishTouchTracking() local 134 if (Math.abs(velocity) >= ViewConfiguration.get(mContext).getScaledMinimumFlingVelocity()) { in finishTouchTracking() 135 triggerQuickstep = velocity > 0; in finishTouchTracking()
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ |
D | StaggeredWorkspaceAnim.java | 69 float velocity) { in StaggeredWorkspaceAnim() argument 70 mVelocity = velocity; in StaggeredWorkspaceAnim() 77 float transFactor = 0.2f + 0.9f * Math.abs(velocity) / MAX_VELOCITY_PX_PER_S; in StaggeredWorkspaceAnim()
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
D | MultiShrinkScroller.java | 598 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()
|