Searched refs:velocity (Results 1 - 17 of 17) sorted by relevance

/packages/apps/Launcher2/src/com/android/launcher2/
H A DSmoothPagedView.java119 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 DDeleteDropTarget.java264 // Calculate how far along the velocity vector we should put the intermediate point on
266 float velocity = Math.abs(vel.length());
267 float vp = Math.min(1f, velocity / (config.getScaledMaximumFlingVelocity() / 2f));
309 * Creates an animation from the current drag view along its current velocity vector.
H A DPagedView.java1467 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument
1478 if (Math.abs(velocity) < mMinFlingVelocity) {
1479 // If the velocity is low enough, then treat this more as an automatic page advance
1493 velocity = Math.abs(velocity);
1494 velocity = Math.max(mMinSnapVelocity, velocity);
1496 // we want the page's snap velocity to approximately match the velocity at which the
1499 duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
[all...]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
H A DOverScroller.java87 * 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 DScroller.java199 * 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 DFlingScroller.java25 // (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 DPaper.java45 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 DScrollerHelper.java74 public void fling(int velocity, int min, int max) { argument
78 velocity, 0, // velocityX, velocityY
H A DEdgeEffect.java77 // Minimum velocity that will be absorbed
253 * Call when the effect absorbs an impact at the given velocity.
260 * @param velocity Velocity at impact in pixels per second.
262 public void onAbsorb(int velocity) { argument
264 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity));
267 mDuration = 0.1f + (velocity * 0.03f);
270 // of velocity.
273 // The glow depends more on the velocity, and therefore starts out
278 // Factor the velocity b
[all...]
H A DEdgeView.java121 // Call when the effect absorbs an impact at the given velocity.
122 // Used when a fling reaches the scroll boundary. velocity is in pixels
124 public void onAbsorb(int velocity, int direction) { argument
125 mEffect[direction].onAbsorb(velocity);
H A DSlotView.java662 float velocity = WIDE ? velocityX : velocityY;
663 mScroller.fling((int) -velocity, 0, scrollLimit);
H A DPhotoView.java295 public void onAbsorb(int velocity, int direction) {
296 mEdgeView.onAbsorb(velocity, direction);
1523 // the user did a fling gesture with enough velocity. 2 If the user has
1540 // If we are at the edge of the current photo and the sweeping velocity
H A DPositionController.java197 void onAbsorb(int velocity, int direction); argument
712 // velocity is used. Returns the time for the duration, or -1 if we cannot
/packages/apps/DeskClock/src/com/android/deskclock/widget/swipeablelistview/
H A DSwipeHelper.java290 * @param velocity The desired pixels/second speed at which the view should
293 private void dismissChild(final View view, float velocity) { argument
296 float newPos = determinePos(animView, velocity);
297 int duration = determineDuration(animView, newPos, velocity);
320 private int determineDuration(View animView, float newPos, float velocity) { argument
322 if (velocity != 0) {
326 .abs(velocity)));
333 private float determinePos(View animView, float velocity) { argument
335 if (velocity < 0 || (velocity
345 snapChild(final View view, float velocity) argument
[all...]
/packages/apps/Browser/src/com/android/browser/
H A DNavTabScroller.java61 // 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/Calendar/src/com/android/calendar/
H A DDayView.java1818 private View switchViews(boolean forward, float xOffSet, float width, float velocity) { argument
1876 long duration = calculateDuration(width - Math.abs(xOffSet), width, velocity);
4985 private long calculateDuration(float delta, float width, float velocity) { argument
4998 velocity = Math.abs(velocity);
4999 velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity);
5002 * we want the page's snap velocity to approximately match the velocity
5007 long duration = 6 * Math.round(1000 * Math.abs(distance / velocity));
[all...]
/packages/apps/Browser/src/com/android/browser/view/
H A DScrollerView.java672 // Break our velocity if we hit a scroll barrier.
678 // Break our velocity if we hit a scroll barrier.
862 protected void onOrthoFling(View draggedView, float velocity) { argument
1783 * @param velocityY The initial velocity in the Y direction. Positive

Completed in 377 milliseconds