/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | OverScroller.java | 662 static private float getDeceleration(int velocity) { in getDeceleration() argument 663 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration() 737 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument 751 void fling(int start, int velocity, int min, int max, int over) { in fling() argument 754 mCurrVelocity = mVelocity = velocity; in fling() 760 startAfterEdge(start, min, max, velocity); in fling() 767 if (velocity != 0) { in fling() 768 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling() 769 totalDistance = getSplineFlingDistance(velocity); in fling() 772 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling() [all …]
|
D | Scroller.java | 392 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); in fling() local 394 mVelocity = velocity; in fling() 395 final double l = Math.log(START_TENSION * velocity / ALPHA); in fling() 401 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling() 402 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling()
|
/packages/apps/DeskClock/src/com/android/deskclock/widget/sgv/ |
D | OverScrollerSGV.java | 661 static private float getDeceleration(int velocity) { in getDeceleration() argument 662 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration() 736 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument 750 void fling(int start, int velocity, int min, int max, int over) { in fling() argument 753 mCurrVelocity = mVelocity = velocity; in fling() 759 startAfterEdge(start, min, max, velocity); in fling() 766 if (velocity != 0) { in fling() 767 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling() 768 totalDistance = getSplineFlingDistance(velocity); in fling() 771 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling() [all …]
|
D | StaggeredGridView.java | 993 final float velocity = VelocityTrackerCompat.getYVelocity(mVelocityTracker, in onTouchEvent() local 995 if (Math.abs(velocity) > mFlingVelocity) { in onTouchEvent() 998 mScroller.fling(0, 0, 0, (int) velocity, 0, 0, in onTouchEvent() 1412 int velocity = (int) mScroller.getCurrVelocity(); in handleOverfling() 1414 velocity = -velocity; in handleOverfling()
|
/packages/apps/Dialer/src/com/android/dialer/list/ |
D | SwipeHelper.java | 273 private void dismissChild(final View view, float velocity) { in dismissChild() argument 276 float newPos = determinePos(animView, velocity); in dismissChild() 277 int duration = determineDuration(animView, newPos, velocity); in dismissChild() 300 private int determineDuration(View animView, float newPos, float velocity) { in determineDuration() argument 302 if (velocity != 0) { in determineDuration() 306 .abs(velocity))); in determineDuration() 313 private float determinePos(View animView, float velocity) { in determinePos() argument 315 if (velocity < 0 || (velocity == 0 && animView.getTranslationX() < 0) in determinePos() 317 || (velocity == 0 && animView.getTranslationX() == 0 && mSwipeDirection == Y)) { in determinePos() 325 public void snapChild(final View view, float velocity) { in snapChild() argument [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | LauncherScroller.java | 429 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); in fling() local 431 mVelocity = velocity; in fling() 432 mDuration = getSplineFlingDuration(velocity); in fling() 437 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling() 438 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling() 440 double totalDistance = getSplineFlingDistance(velocity); in fling() 441 mDistance = (int) (totalDistance * Math.signum(velocity)); in fling() 459 private double getSplineDeceleration(float velocity) { in getSplineDeceleration() argument 460 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff)); in getSplineDeceleration() 463 private int getSplineFlingDuration(float velocity) { in getSplineFlingDuration() argument [all …]
|
D | SmoothPagedView.java | 116 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 118 super.snapToPageWithVelocity(whichPage, velocity); in snapToPageWithVelocity() 124 private void snapToPageWithVelocity(int whichPage, int velocity, boolean settle) { in snapToPageWithVelocity() argument 144 velocity = Math.abs(velocity); in snapToPageWithVelocity() 145 if (velocity > 0) { in snapToPageWithVelocity() 146 duration += (duration / (velocity / mBaseLineFlingVelocity)) * mFlingVelocityInfluence; in snapToPageWithVelocity()
|
D | PagedView.java | 2198 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument 2206 if (Math.abs(velocity) < mMinFlingVelocity || isInOverScroll()) { in snapToPageWithVelocity() 2221 velocity = Math.abs(velocity); in snapToPageWithVelocity() 2222 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity() 2227 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/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()
|
D | DeleteDropTarget.java | 275 float velocity = Math.abs(vel.length()); in createFlingToTrashAnimatorListener() local 276 float vp = Math.min(1f, velocity / (config.getScaledMaximumFlingVelocity() / 2f)); in createFlingToTrashAnimatorListener()
|
/packages/apps/Browser/src/com/android/browser/ |
D | NavTabScroller.java | 266 private void animateOut(final View v, float velocity) { in animateOut() argument 268 animateOut(v, velocity, start); in animateOut() 271 private void animateOut(final View v, float velocity, float start) { in animateOut() argument 275 if (velocity < 0) { in animateOut() 281 long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity)); in animateOut() 455 protected void onOrthoFling(View v, float velocity) { in onOrthoFling() argument 457 if (mAnimator == null && Math.abs(velocity) > mFlingVelocity / 2) { in onOrthoFling() 458 animateOut(v, velocity); in onOrthoFling()
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
D | MultiShrinkScroller.java | 534 final float velocity = getCurrentVelocity(); in stopDrag() local 535 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { in stopDrag() 536 fling(-velocity); in stopDrag() 882 private void fling(float velocity) { in fling() argument 885 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, in fling() 887 if (velocity < 0 && mTransparentView.getHeight() <= 0) { in fling()
|
/packages/apps/FMRadio/src/com/android/fmradio/views/ |
D | FmScroller.java | 440 final float velocity = getCurrentVelocity(); in stopDrag() local 441 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { in stopDrag() 442 fling(-velocity); in stopDrag() 594 private void fling(float velocity) { in fling() argument 598 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, in fling()
|
/packages/apps/Dialer/src/com/android/dialer/widget/ |
D | ViewDragHelper.java | 625 private int computeAxisDuration(int delta, int velocity, int motionRange) { in computeAxisDuration() argument 637 velocity = Math.abs(velocity); in computeAxisDuration() 638 if (velocity > 0) { in computeAxisDuration() 639 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in computeAxisDuration()
|
/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()
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | GalleryThumbnailView.java | 366 final float velocity = VelocityTrackerCompat.getXVelocity(mVelocityTracker, in onTouchEvent() local 368 if (Math.abs(velocity) > mFlingVelocity) { // TODO in onTouchEvent() 370 mScroller.fling(0, 0, (int) velocity, 0, in onTouchEvent()
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | ModeListView.java | 1874 private Animator animateListToWidthAtVelocity(float velocity, int width) { in animateListToWidthAtVelocity() argument 1884 int duration = (int) (width / velocity); in animateListToWidthAtVelocity() 1921 float velocity = (1 - percentageIntoSlowZone) * VELOCITY_THRESHOLD; in getMaxMovementBasedOnPosition() local 1922 position = velocity * timeElapsed + lastVisibleWidth; in getMaxMovementBasedOnPosition()
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | DayView.java | 1818 private View switchViews(boolean forward, float xOffSet, float width, float velocity) { in switchViews() argument 1876 long duration = calculateDuration(width - Math.abs(xOffSet), width, velocity); in switchViews() 4994 private long calculateDuration(float delta, float width, float velocity) { in calculateDuration() argument 5007 velocity = Math.abs(velocity); in calculateDuration() 5008 velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity); in calculateDuration() 5016 long duration = 6 * Math.round(1000 * Math.abs(distance / velocity)); in calculateDuration() 5019 + distanceRatio + " distance:" + distance + " velocity:" + velocity in calculateDuration()
|