/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/Launcher3/src/com/android/launcher3/ |
D | LauncherScroller.java | 428 float velocity = (float) Math.hypot(velocityX, velocityY); in fling() local 430 mVelocity = velocity; in fling() 431 mDuration = getSplineFlingDuration(velocity); in fling() 436 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling() 437 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling() 439 double totalDistance = getSplineFlingDistance(velocity); in fling() 440 mDistance = (int) (totalDistance * Math.signum(velocity)); in fling() 458 private double getSplineDeceleration(float velocity) { in getSplineDeceleration() argument 459 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff)); in getSplineDeceleration() 462 private int getSplineFlingDuration(float velocity) { in getSplineFlingDuration() argument [all …]
|
D | PagedView.java | 1832 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 1840 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity() 1855 velocity = Math.abs(velocity); in snapToPageWithVelocity() 1856 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity() 1861 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity()
|
/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 | 173 boolean onDrag(float displacement, float velocity); in onDrag() argument 175 void onDragEnd(float velocity, boolean fling); in onDragEnd() argument 320 float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0; in computeVelocity() local 322 mVelocity = velocity; in computeVelocity() 325 mVelocity = interpolate(mVelocity, velocity, alpha); in computeVelocity() 344 public static long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument 346 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration() 350 … Log.d(TAG, String.format("calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration() 359 public void setVelocityAtZero(float velocity) { in setVelocityAtZero() argument 360 mSteeper = velocity > FAST_FLING_PX_MS; in setVelocityAtZero()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
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 | 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 | 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()
|
D | EdgeView.java | 126 public void onAbsorb(int velocity, int direction) { in onAbsorb() argument 127 mEffect[direction].onAbsorb(velocity); in onAbsorb()
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | SmoothPagedView.java | 119 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 121 super.snapToPageWithVelocity(whichPage, velocity); in snapToPageWithVelocity() 127 private void snapToPageWithVelocity(int whichPage, int velocity, boolean settle) { in snapToPageWithVelocity() argument 147 velocity = Math.abs(velocity); in snapToPageWithVelocity() 148 if (velocity > 0) { in snapToPageWithVelocity() 149 duration += (duration / (velocity / mBaseLineFlingVelocity)) * mFlingVelocityInfluence; in snapToPageWithVelocity()
|
D | PagedView.java | 1517 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 1528 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity() 1543 velocity = Math.abs(velocity); in snapToPageWithVelocity() 1544 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity() 1549 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity()
|
/packages/apps/Launcher3/src/com/android/launcher3/anim/ |
D | SpringAnimationHandler.java | 166 public void animateToPositionWithVelocity(float position, int startValue, float velocity) { in animateToPositionWithVelocity() argument 169 + ", velocity=" + velocity); in animateToPositionWithVelocity() 172 mCurrentVelocity = velocity; in animateToPositionWithVelocity() 208 float velocity = isVerticalDirection() in computeVelocity() local 211 velocity *= VELOCITY_DAMPING_FACTOR; in computeVelocity() 213 if (DEBUG) Log.d(TAG, "computeVelocity=" + velocity); in computeVelocity() 214 return velocity; in computeVelocity()
|
/packages/apps/Launcher3/src/com/android/launcher3/allapps/ |
D | AllAppsTransitionController.java | 197 public boolean onDrag(float displacement, float velocity) { in onDrag() argument 202 mContainerVelocity = velocity; in onDrag() 211 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 220 if (velocity < 0) { in onDragEnd() 221 calculateDuration(velocity, mAppsView.getTranslationY()); in onDragEnd() 236 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd() 242 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd() 245 calculateDuration(velocity, Math.abs(mAppsView.getTranslationY())); in onDragEnd() 365 private void calculateDuration(float velocity, float disp) { in calculateDuration() argument 366 mAnimationDuration = SwipeDetector.calculateDuration(velocity, disp / mShiftRange); in calculateDuration()
|
D | AllAppsRecyclerView.java | 545 public boolean onDrag(float displacement, float velocity) { 583 public void onDragEnd(float velocity, boolean fling) { 592 float velocity = y / getDampedOverScroll(getHeight()) * MAX_RELEASE_VELOCITY; 595 mSpringAnimationHandler.animateToPositionWithVelocity(0, -1, -velocity);
|
D | AllAppsCaretController.java | 65 public void updateCaret(float containerProgress, float velocity, boolean dragging) { in updateCaret() argument 72 final float pctOfFlingVelocity = Math.max(-1, Math.min(velocity / PEAK_VELOCITY, 1)); in updateCaret()
|
/packages/apps/Launcher3/src/com/android/launcher3/notification/ |
D | NotificationMainView.java | 144 public boolean onDrag(float displacement, float velocity) { in onDrag() argument 152 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 161 endTranslation = velocity < 0 ? - getWidth() : getWidth(); in onDragEnd() 171 interpolator.setVelocityAtZero(velocity); in onDragEnd() 173 long duration = SwipeDetector.calculateDuration(velocity, in onDragEnd()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | WidgetsBottomSheet.java | 274 public boolean onDrag(float displacement, float velocity) { in onDrag() argument 290 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 291 if ((fling && velocity > 0) || getTranslationY() > (mTranslationYRange) / 2) { in onDragEnd() 292 mScrollInterpolator.setVelocityAtZero(velocity); in onDragEnd() 293 mOpenCloseAnimator.setDuration(SwipeDetector.calculateDuration(velocity, in onDragEnd() 298 mOpenCloseAnimator.setDuration(SwipeDetector.calculateDuration(velocity, in onDragEnd()
|
/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/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()
|
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/ |
D | ConversationListSwipeHelper.java | 430 private long calculateTranslationDuration(final float deltaPosition, final float velocity) { in calculateTranslationDuration() argument 431 Assert.isTrue(velocity != 0); in calculateTranslationDuration() 432 final float durationInSeconds = Math.abs(deltaPosition / velocity); in calculateTranslationDuration()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/affordance/ |
D | SwipeButtonView.java | 193 public void finishAnimation(float velocity, @Nullable final Runnable mAnimationEndRunnable) { in finishAnimation() argument 202 animatorToRadius, circleRadius, maxCircleSize, velocity, maxCircleSize); in finishAnimation() 223 previewClipper, circleRadius, maxCircleSize, velocity, maxCircleSize); in finishAnimation()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/ |
D | ScrollController.java | 812 float velocity = mFlingScroller.getCurrVelocity(); in startScroll() local 813 float velocityX = velocity * curDx / hyp; in startScroll() 814 float velocityY = velocity * curDy / hyp; in startScroll()
|