Searched defs:velocity (Results 1 - 18 of 18) sorted by relevance

/packages/apps/Gallery2/src/com/android/gallery3d/ui/
H A DScrollerHelper.java74 public void fling(int velocity, int min, int max) { argument
78 velocity, 0, // velocityX, velocityY
H A DEdgeView.java123 // 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 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 DEdgeEffect.java79 // 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 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/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.java1517 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 DSmoothPagedView.java116 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 DLauncherScroller.java228 * 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 DPagedView.java1962 // Check the velocity and see if we are flinging-to-delete
2151 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument
2159 if (Math.abs(velocity) < mMinFlingVelocity) {
2160 // If the velocity is low enough, then treat this more as an automatic page advance
2174 velocity = Math.abs(velocity);
2175 velocity = Math.max(mMinSnapVelocity, velocity);
2177 // we want the page's snap velocity to approximately match the velocity a
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
H A DSwipeHelper.java263 * @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/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/Dialer/src/com/android/dialer/list/
H A DSwipeHelper.java270 * @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/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
/packages/apps/DeskClock/src/com/android/deskclock/widget/sgv/
H A DOverScrollerSGV.java89 * 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 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...]
/packages/apps/Camera2/src/com/android/camera/ui/
H A DFilmStripView.java395 public void fling(float velocity); argument
2181 // velocity doesn't become too slow eventually, we add a huge number
2204 // Need to find the ending distance (e), so that the starting velocity
2205 // is the velocity of fling.
2217 final float velocity = Math.max(Math.abs(velocityX), Math.abs(velocityY));
2220 * Math.pow(velocity, (1f/ (factor - 1f))));
2798 // In full-screen, fling of a velocity above a threshold should go to
/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);
4994 private long calculateDuration(float delta, float width, float velocity) { argument
5007 velocity = Math.abs(velocity);
5008 velocity = Math.max(MINIMUM_SNAP_VELOCITY, velocity);
5011 * we want the page's snap velocity to approximately match the velocity
5016 long duration = 6 * Math.round(1000 * Math.abs(distance / velocity));
[all...]

Completed in 531 milliseconds