/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/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/Launcher3/src/com/android/launcher3/notification/ |
D | FlingAnimationUtils.java | 109 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument 110 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply() 123 float velocity) { in apply() argument 124 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply() 138 public void apply(Animator animator, float currValue, float endValue, float velocity, in apply() argument 140 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply() 158 float velocity, float maxDistance) { in apply() argument 159 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply() 166 float endValue, float velocity, float maxDistance) { in getProperties() argument 170 float velAbs = Math.abs(velocity); in getProperties() [all …]
|
D | SwipeHelper.java | 329 public void dismissChild(final View view, float velocity, boolean useAccelerateInterpolator) { in dismissChild() argument 330 dismissChild(view, velocity, null /* endAction */, 0 /* delay */, in dismissChild() 342 public void dismissChild(final View animView, float velocity, final Runnable endAction, in dismissChild() argument 350 boolean animateUpForMenu = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild() 353 boolean animateLeftForRtl = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild() 355 boolean animateLeft = velocity < 0 in dismissChild() 356 || (velocity == 0 && getTranslation(animView) < 0 && !isDismissAll); in dismissChild() 366 if (velocity != 0) { in dismissChild() 369 .abs(velocity)) in dismissChild() 396 newPos, velocity, getSize(animView)); in dismissChild() [all …]
|
/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 | 1852 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 1860 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity() 1875 velocity = Math.abs(velocity); in snapToPageWithVelocity() 1876 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity() 1881 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/allapps/ |
D | VerticalPullDetector.java | 122 boolean onDrag(float displacement, float velocity); in onDrag() argument 124 void onDragEnd(float velocity, boolean fling); in onDragEnd() argument 256 float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0; in computeVelocity() local 258 mVelocity = velocity; in computeVelocity() 261 mVelocity = interpolate(mVelocity, velocity, alpha); in computeVelocity() 280 public long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument 282 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration() 286 … Log.d(TAG, String.format("calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration() 295 public void setVelocityAtZero(float velocity) { in setVelocityAtZero() argument 296 mSteeper = velocity > FAST_FLING_PX_MS; in setVelocityAtZero()
|
D | AllAppsTransitionController.java | 177 public boolean onDrag(float displacement, float velocity) { in onDrag() argument 182 mContainerVelocity = velocity; in onDrag() 191 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 197 if (velocity < 0) { in onDragEnd() 198 calculateDuration(velocity, mAppsView.getTranslationY()); in onDragEnd() 210 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd() 216 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd() 219 calculateDuration(velocity, Math.abs(mAppsView.getTranslationY())); in onDragEnd() 315 private void calculateDuration(float velocity, float disp) { in calculateDuration() argument 316 mAnimationDuration = mDetector.calculateDuration(velocity, disp / mShiftRange); in calculateDuration()
|
D | AllAppsCaretController.java | 64 public void updateCaret(float containerProgress, float velocity, boolean dragging) { in updateCaret() argument 71 final float pctOfFlingVelocity = Math.max(-1, Math.min(velocity / PEAK_VELOCITY, 1)); in updateCaret()
|
/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/util/ |
D | LauncherEdgeEffect.java | 238 public void onAbsorb(int velocity) { in onAbsorb() argument 240 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); in onAbsorb() 243 mDuration = 0.15f + (velocity * 0.02f); in onAbsorb() 255 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f) / 2, 1.f); in onAbsorb() 258 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | WidgetsBottomSheet.java | 266 public boolean onDrag(float displacement, float velocity) { in onDrag() argument 273 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument 274 if ((fling && velocity > 0) || getTranslationY() > (mTranslationYRange) / 2) { in onDragEnd() 275 mScrollInterpolator.setVelocityAtZero(velocity); in onDragEnd() 276 mOpenCloseAnimator.setDuration(mVerticalPullDetector.calculateDuration(velocity, in onDragEnd() 281 mOpenCloseAnimator.setDuration(mVerticalPullDetector.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()
|