/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | ScrollerHelper.java | 74 public void fling(int velocity, int min, int max) { argument 78 velocity, 0, // velocityX, velocityY
|
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 | 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 | 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 | PositionController.java | 197 void onAbsorb(int velocity, int direction); argument 712 // velocity is used. Returns the time for the duration, or -1 if we cannot
|
/packages/apps/Launcher3/src/com/android/launcher3/allapps/ |
H A D | AllAppsCaretController.java | 30 // The velocity at which the caret will peak (i.e. exhibit a 90 degree bend) 57 * defined by the {@link AllAppsTransitionController}. Uses the container's velocity to adjust 61 * @param velocity The velocity of the container 64 public void updateCaret(float containerProgress, float velocity, boolean dragging) { argument 65 // If we're in portrait and the shift is not 0 or 1, adjust the caret based on velocity 70 // How fast are we moving as a percentage of the peak velocity? 71 final float pctOfFlingVelocity = Math.max(-1, Math.min(velocity / PEAK_VELOCITY, 1));
|
H A D | VerticalPullDetector.java | 27 * The minimum release velocity in pixels per millisecond that triggers fling.. 32 * The time constant used to calculate dampening in the low-pass filter of scroll velocity. 118 boolean onDrag(float displacement, float velocity); argument 120 void onDragEnd(float velocity, boolean fling); argument 222 Log.d(TAG, String.format("onDrag disp=%.1f, velocity=%.1f", 233 Log.d(TAG, String.format("onScrolEnd disp=%.1f, velocity=%.1f", 241 * Computes the damped velocity using the two motion events and the previous velocity. 252 float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0; 254 mVelocity = velocity; [all...] |
H A D | AllAppsTransitionController.java | 36 * If release velocity > THRES1, snap according to the direction of movement. 37 * If release velocity < THRES1, snap according to either top or bottom depending on whether it's 199 public boolean onDrag(float displacement, float velocity) { argument 204 mContainerVelocity = velocity; 213 public void onDragEnd(float velocity, boolean fling) { argument 219 if (velocity < 0) { 220 calculateDuration(velocity, mAppsView.getTranslationY()); 232 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); 235 // snap to top or bottom using the release velocity 238 calculateDuration(velocity, Mat 337 calculateDuration(float velocity, float disp) argument 538 setVelocityAtZero(float velocity) argument [all...] |
/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 | 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/Camera2/src/com/android/camera/filmstrip/ |
H A D | FilmstripController.java | 100 * @param velocity 102 public void fling(float velocity); argument
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
H A D | LauncherEdgeEffect.java | 48 // Minimum velocity that will be absorbed 50 // Maximum velocity, clamps at this value 229 * Call when the effect absorbs an impact at the given velocity. 236 * @param velocity Velocity at impact in pixels per second. 238 public void onAbsorb(int velocity) { argument 240 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); 243 mDuration = 0.15f + (velocity * 0.02f); 245 // The glow depends more on the velocity, and therefore starts out 255 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocit [all...] |
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/ |
H A D | ConversationListSwipeHelper.java | 369 if (velocityX != 0 // Has velocity. 400 * Determine if the swipe has enough velocity to be dismissed. 430 private long calculateTranslationDuration(final float deltaPosition, final float velocity) { argument 431 Assert.isTrue(velocity != 0); 432 final float durationInSeconds = Math.abs(deltaPosition / velocity);
|
/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/Launcher3/src/com/android/launcher3/ |
H A D | LauncherScroller.java | 227 * Returns the current velocity. 229 * @return The original velocity less the deceleration. Result may be 386 * depend on the initial velocity of the fling. 390 * @param velocityX Initial velocity of the fling (X) measured in pixels per 392 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 428 float velocity = (float) Math.hypot(velocityX, velocityY); 430 mVelocity = velocity; 431 mDuration = getSplineFlingDuration(velocity); 436 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; 458 getSplineDeceleration(float velocity) argument 462 getSplineFlingDuration(float velocity) argument 468 getSplineFlingDistance(float velocity) argument [all...] |
H A D | PagedView.java | 1961 protected void snapToPageWithVelocity(int whichPage, int velocity) { argument 1969 if (Math.abs(velocity) < mMinFlingVelocity) { 1970 // If the velocity is low enough, then treat this more as an automatic page advance 1984 velocity = Math.abs(velocity); 1985 velocity = Math.max(mMinSnapVelocity, velocity); 1987 // we want the page's snap velocity to approximately match the velocity at which the 1990 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); [all...] |
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
H A D | OverScroller.java | 86 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 103 * velocity which is preserved in the bounce when the horizontal edge is reached. A null value 172 * Returns the absolute value of the current velocity. 174 * @return The original velocity less the deceleration, norm of the X and Y velocity vector. 407 * depend on the initial velocity of the fling. 411 * @param velocityX Initial velocity of the fling (X) measured in pixels per 413 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 549 // Initial velocity 552 // Current velocity 659 getDeceleration(int velocity) argument 734 startSpringback(int start, int end, int velocity) argument 748 fling(int start, int velocity, int min, int max, int over) argument 784 getSplineDeceleration(int velocity) argument 788 getSplineFlingDistance(int velocity) argument 795 getSplineFlingDuration(int velocity) argument 801 fitOnBounceCurve(int start, int end, int velocity) argument 813 startBounceAfterEdge(int start, int end, int velocity) argument 819 startAfterEdge(int start, int min, int max, int velocity) argument [all...] |
/packages/apps/Camera2/src/com/android/camera/ui/ |
H A D | ModeListView.java | 89 // If the fling velocity exceeds this threshold, snap to full screen at a constant 1053 // Cache velocity in the unit pixel/ms. 1811 // If the fling velocity exceeds this threshold, snap to full screen 1875 * Animate the mode list to the given width at a constant velocity. 1877 * @param velocity the velocity that animation will be at 1880 private Animator animateListToWidthAtVelocity(float velocity, int width) { argument 1889 int duration = (int) (width / velocity); 1926 float velocity = (1 - percentageIntoSlowZone) * VELOCITY_THRESHOLD; 1927 position = velocity * timeElapse [all...] |
/packages/apps/Contacts/src/com/android/contacts/widget/ |
H A D | MultiShrinkScroller.java | 63 * order to track velocity, modify EdgeEffect color & perform the originally specified animations. 596 final float velocity = getCurrentVelocity(); 597 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { 598 fling(-velocity); 944 private void fling(float velocity) { argument 947 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, 949 if (velocity < 0 && mTransparentView.getHeight() <= 0) { 1299 * Interpolator that enforces a specific starting velocity. This is useful to avoid a
|
/packages/apps/Calendar/src/com/android/calendar/ |
H A D | DayView.java | 1818 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...] |