/packages/apps/Launcher2/src/com/android/launcher2/ |
H A D | SmoothPagedView.java | 119 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument 121 super.snapToPageWithVelocity(whichPage, velocity); 127 private void snapToPageWithVelocity(int whichPage, int velocity, boolean settle) { argument 147 velocity = Math.abs(velocity); 148 if (velocity > 0) { 149 duration += (duration / (velocity / mBaseLineFlingVelocity)) * mFlingVelocityInfluence;
|
H A D | DeleteDropTarget.java | 273 // Calculate how far along the velocity vector we should put the intermediate point on 275 float velocity = Math.abs(vel.length()); 276 float vp = Math.min(1f, velocity / (config.getScaledMaximumFlingVelocity() / 2f)); 318 * Creates an animation from the current drag view along its current velocity vector.
|
H A D | PagedView.java | 1517 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument 1528 if (Math.abs(velocity) < mMinFlingVelocity) { 1529 // If the velocity is low enough, then treat this more as an automatic page advance 1543 velocity = Math.abs(velocity); 1544 velocity = Math.max(mMinSnapVelocity, velocity); 1546 // we want the page's snap velocity to approximately match the velocity at which the 1549 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/ |
H A D | SmoothPagedView.java | 116 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument 118 super.snapToPageWithVelocity(whichPage, velocity); 124 private void snapToPageWithVelocity(int whichPage, int velocity, boolean settle) { argument 144 velocity = Math.abs(velocity); 145 if (velocity > 0) { 146 duration += (duration / (velocity / mBaseLineFlingVelocity)) * mFlingVelocityInfluence;
|
H A D | LauncherScroller.java | 228 * Returns the current velocity. 230 * @return The original velocity less the deceleration. Result may be 387 * depend on the initial velocity of the fling. 391 * @param velocityX Initial velocity of the fling (X) measured in pixels per 393 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 429 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); 431 mVelocity = velocity; 432 mDuration = getSplineFlingDuration(velocity); 437 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; 459 getSplineDeceleration(float velocity) argument 463 getSplineFlingDuration(float velocity) argument 469 getSplineFlingDistance(float velocity) argument [all...] |
H A D | DeleteDropTarget.java | 381 // Calculate how far along the velocity vector we should put the intermediate point on 383 float velocity = Math.abs(vel.length()); 384 float vp = Math.min(1f, velocity / (config.getScaledMaximumFlingVelocity() / 2f)); 426 * Creates an animation from the current drag view along its current velocity vector.
|
H A D | PagedView.java | 1988 // Check the velocity and see if we are flinging-to-delete 2198 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument 2206 if (Math.abs(velocity) < mMinFlingVelocity || isInOverScroll()) { 2207 // If the velocity is low enough, then treat this more as an automatic page advance 2221 velocity = Math.abs(velocity); 2222 velocity = Math.max(mMinSnapVelocity, velocity); 2224 // we want the page's snap velocity to approximately match the velocity a [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/widget/sgv/ |
H A D | OverScrollerSGV.java | 89 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 106 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 175 * Returns the absolute value of the current velocity. 177 * @return The original velocity less the deceleration, norm of the X and Y velocity vector. 412 * depend on the initial velocity of the fling. 416 * @param velocityX Initial velocity of the fling (X) measured in pixels per 418 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 554 // Initial velocity 557 // Current velocity 661 getDeceleration(int velocity) argument 736 startSpringback(int start, int end, int velocity) argument 750 fling(int start, int velocity, int min, int max, int over) argument 786 getSplineDeceleration(int velocity) argument 790 getSplineFlingDistance(int velocity) argument 797 getSplineFlingDuration(int velocity) argument 803 fitOnBounceCurve(int start, int end, int velocity) argument 815 startBounceAfterEdge(int start, int end, int velocity) argument 821 startAfterEdge(int start, int min, int max, int velocity) argument [all...] |
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | OverScroller.java | 87 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 104 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 173 * Returns the absolute value of the current velocity. 175 * @return The original velocity less the deceleration, norm of the X and Y velocity vector. 410 * depend on the initial velocity of the fling. 414 * @param velocityX Initial velocity of the fling (X) measured in pixels per 416 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 552 // Initial velocity 555 // Current velocity 662 getDeceleration(int velocity) argument 737 startSpringback(int start, int end, int velocity) argument 751 fling(int start, int velocity, int min, int max, int over) argument 787 getSplineDeceleration(int velocity) argument 791 getSplineFlingDistance(int velocity) argument 798 getSplineFlingDuration(int velocity) argument 804 fitOnBounceCurve(int start, int end, int velocity) argument 816 startBounceAfterEdge(int start, int end, int velocity) argument 822 startAfterEdge(int start, int min, int max, int velocity) argument [all...] |
H A D | Scroller.java | 199 * Returns the current velocity. 201 * @return The original velocity less the deceleration. Result may be 350 * depend on the initial velocity of the fling. 354 * @param velocityX Initial velocity of the fling (X) measured in pixels per 356 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 392 float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY); 394 mVelocity = velocity; 395 final double l = Math.log(START_TENSION * velocity / ALPHA); 401 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | FlingScroller.java | 25 // (1) The velocity does not change because of min/max limit. 32 // The fling duration (in milliseconds) when velocity is 1 pixel/second 85 double velocity = Math.hypot(velocityX, velocityY); 86 mSinAngle = velocityY / velocity; 87 mCosAngle = velocityX / velocity; 90 // velocity formula: v(t) = d * (e - s) * (1 - t / T) ^ (d - 1) / T 97 * Math.pow(Math.abs(velocity), 1.0 / (DECELERATED_FACTOR - 1))); 101 velocity * mDuration / DECELERATED_FACTOR / 1000); 137 // velocity formula: v(t) = d * (e - s) * (1 - t / T) ^ (d - 1) / T
|
H A D | Paper.java | 45 public void edgeReached(float velocity) { argument 46 velocity /= mWidth; // make it relative to width 47 if (velocity < 0) { 48 mAnimationRight.onAbsorb(-velocity); 50 mAnimationLeft.onAbsorb(velocity); 145 public void onAbsorb(float velocity) { argument 146 float finish = Utils.clamp(mValue + velocity * VELOCITY_FACTOR,
|
H A D | ScrollerHelper.java | 74 public void fling(int velocity, int min, int max) { argument 78 velocity, 0, // velocityX, velocityY
|
H A D | EdgeEffect.java | 79 // Minimum velocity that will be absorbed 255 * Call when the effect absorbs an impact at the given velocity. 262 * @param velocity Velocity at impact in pixels per second. 264 public void onAbsorb(int velocity) { argument 266 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity)); 269 mDuration = 0.1f + (velocity * 0.03f); 272 // of velocity. 275 // The glow depends more on the velocity, and therefore starts out 280 // Factor the velocity b [all...] |
H A D | EdgeView.java | 123 // Call when the effect absorbs an impact at the given velocity. 124 // Used when a fling reaches the scroll boundary. velocity is in pixels 126 public void onAbsorb(int velocity, int direction) { argument 127 mEffect[direction].onAbsorb(velocity);
|
H A D | SlotView.java | 663 float velocity = WIDE ? velocityX : velocityY; 664 mScroller.fling((int) -velocity, 0, scrollLimit);
|
/packages/apps/Dialer/src/com/android/dialer/list/ |
H A D | SwipeHelper.java | 270 * @param velocity The desired pixels/second speed at which the view should 273 private void dismissChild(final View view, float velocity) { argument 276 float newPos = determinePos(animView, velocity); 277 int duration = determineDuration(animView, newPos, velocity); 300 private int determineDuration(View animView, float newPos, float velocity) { argument 302 if (velocity != 0) { 306 .abs(velocity))); 313 private float determinePos(View animView, float velocity) { argument 315 if (velocity < 0 || (velocity 325 snapChild(final View view, float velocity) argument [all...] |
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
H A D | SwipeHelper.java | 263 * @param velocity The desired pixels/second speed at which the view should 266 private void dismissChild(final SwipeableItemView view, float velocity) { argument 269 float newPos = determinePos(animView, velocity); 270 int duration = determineDuration(animView, newPos, velocity); 293 private static int determineDuration(View animView, float newPos, float velocity) { argument 295 if (velocity != 0) { 299 .abs(velocity))); 306 private float determinePos(View animView, float velocity) { argument 308 if (velocity < 0 || (velocity [all...] |
/packages/apps/Camera2/src/com/android/camera/filmstrip/ |
H A D | FilmstripController.java | 105 * @param velocity 107 public void fling(float velocity); argument
|
/packages/apps/Browser/src/com/android/browser/ |
H A D | NavTabScroller.java | 61 // after drag animation velocity in pixels/sec 266 private void animateOut(final View v, float velocity) { argument 268 animateOut(v, velocity, start); 271 private void animateOut(final View v, float velocity, float start) { argument 275 if (velocity < 0) { 281 long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity)); 455 protected void onOrthoFling(View v, float velocity) { argument 457 if (mAnimator == null && Math.abs(velocity) > mFlingVelocity / 2) { 458 animateOut(v, velocity);
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
H A D | MultiShrinkScroller.java | 62 * order to track velocity, modify EdgeEffect color & perform the originally specified animations. 534 final float velocity = getCurrentVelocity(); 535 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { 536 fling(-velocity); 882 private void fling(float velocity) { argument 885 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, 887 if (velocity < 0 && mTransparentView.getHeight() <= 0) { 1236 * Interpolator that enforces a specific starting velocity. This is useful to avoid a
|
/packages/apps/Dialer/src/com/android/dialer/widget/ |
H A D | ViewDragHelper.java | 190 * The fling velocity is also supplied, if relevant. The velocity values may 203 * @param xvel X velocity of the pointer as it left the screen in pixels per second. 204 * @param yvel Y velocity of the pointer as it left the screen in pixels per second. 215 * @param xvel X velocity of the fling. 216 * @param yvel Y velocity of the fling. 402 * Set the minimum velocity that will be detected as having a magnitude greater than zero 403 * in pixels per second. Callback methods accepting a velocity will be clamped appropriately. 405 * @param minVel Minimum velocity to detect 412 * Return the currently configured minimum velocity 625 computeAxisDuration(int delta, int velocity, int motionRange) argument [all...] |
/packages/apps/Gallery2/src/com/android/photos/views/ |
H A D | GalleryThumbnailView.java | 354 // Break fling velocity if we impacted an edge. 366 final float velocity = VelocityTrackerCompat.getXVelocity(mVelocityTracker, 368 if (Math.abs(velocity) > mFlingVelocity) { // TODO 370 mScroller.fling(0, 0, (int) velocity, 0,
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/ |
H A D | ScrollController.java | 599 // fling animations, the fling animation will mistakenly continue the old velocity of scroll 600 // animation: that's wrong, we want fling animation pickup the old velocity of last fling. 812 float velocity = mFlingScroller.getCurrVelocity(); 813 float velocityX = velocity * curDx / hyp; 814 float velocityY = velocity * curDy / hyp;
|
/packages/apps/FMRadio/src/com/android/fmradio/views/ |
H A D | FmScroller.java | 440 final float velocity = getCurrentVelocity(); 441 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { 442 fling(-velocity); 594 private void fling(float velocity) { argument 598 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, 677 * Interpolator that enforces a specific starting velocity.
|