Searched refs:velocity (Results 1 - 12 of 12) 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 DPagedView.java76 // the velocity at which a fling gesture will cause us to snap to the next page
1426 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument
1437 if (Math.abs(velocity) < MIN_FLING_VELOCITY) {
1438 // If the velocity is low enough, then treat this more as an automatic page advance
1452 velocity = Math.abs(velocity);
1453 velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity);
1455 // we want the page's snap velocity to approximately match the velocity a
[all...]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
H A DFlingScroller.java26 // (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);
127 // velocity formula: v(t) = d * (e - s) * (1 - t / T) ^ (d - 1) / T
H A DPaper.java49 public void edgeReached(float velocity) { argument
50 velocity /= mWidth; // make it relative to width
51 if (velocity < 0) {
52 mAnimationRight.onAbsorb(-velocity);
54 mAnimationLeft.onAbsorb(velocity);
152 public void onAbsorb(float velocity) { argument
153 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.java76 // Minimum velocity that will be absorbed
252 * Call when the effect absorbs an impact at the given velocity.
259 * @param velocity Velocity at impact in pixels per second.
261 public void onAbsorb(int velocity) { argument
263 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity));
266 mDuration = 0.1f + (velocity * 0.03f);
269 // of velocity.
272 // The glow depends more on the velocity, and therefore starts out
277 // Factor the velocity b
[all...]
H A DEdgeView.java119 // Call when the effect absorbs an impact at the given velocity.
120 // Used when a fling reaches the scroll boundary. velocity is in pixels
122 public void onAbsorb(int velocity, int direction) { argument
123 mEffect[direction].onAbsorb(velocity);
H A DPhotoView.java407 private boolean swipeImages(float velocity) { argument
417 // If we are at the edge of the current photo and the sweeping velocity
422 if (velocity < -SWIPE_THRESHOLD &&
430 } else if (velocity > SWIPE_THRESHOLD &&
H A DSlotView.java681 float velocity = WIDE ? velocityX : velocityY;
682 mScroller.fling((int) -velocity, 0, scrollLimit);
/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.java1756 private View switchViews(boolean forward, float xOffSet, float width, float velocity) { argument
1814 long duration = calculateDuration(width - Math.abs(xOffSet), width, velocity);
4742 private long calculateDuration(float delta, float width, float velocity) { argument
4755 velocity = Math.abs(velocity);
4756 velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity);
4759 * we want the page's snap velocity to approximately match the velocity
4764 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 214 milliseconds