/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/ |
H A D | FlingAnimationUtils.java | 62 * @param velocity the current velocity of the motion 64 public void apply(Animator animator, float currValue, float endValue, float velocity) { argument 65 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); 75 * @param velocity the current velocity of the motion 78 ViewPropertyAnimator animator, float currValue, float endValue, float velocity) { 79 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); 89 * @param velocity the current velocity o 77 apply( ViewPropertyAnimator animator, float currValue, float endValue, float velocity) argument 93 apply( Animator animator, float currValue, float endValue, float velocity, float maxDistance) argument 111 apply( ViewPropertyAnimator animator, float currValue, float endValue, float velocity, float maxDistance) argument 122 getProperties( float currValue, float endValue, float velocity, float maxDistance) argument 161 applyDismissing( Animator animator, float currValue, float endValue, float velocity, float maxDistance) argument 181 applyDismissing( ViewPropertyAnimator animator, float currValue, float endValue, float velocity, float maxDistance) argument 193 getDismissingProperties( float currValue, float endValue, float velocity, float maxDistance) argument 234 calculateLinearOutFasterInY2(float velocity) argument 275 VelocityInterpolator(float durationSeconds, float velocity, float diff) 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;
|
/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...] |
H A D | Scroller.java | 198 * Returns the current velocity. 200 * @return The original velocity less the deceleration. Result may be 349 * depend on the initial velocity of the fling. 353 * @param velocityX Initial velocity of the fling (X) measured in pixels per 355 * @param velocityY Initial velocity of the fling (Y) measured in pixels per 391 float velocity = (float) Math.hypot(velocityX, velocityY); 393 mVelocity = velocity; 394 final double l = Math.log(START_TENSION * velocity / ALPHA); 400 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);
|
/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...] |
/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
H A D | SwipeDetector.java | 51 * The minimum release velocity in pixels per millisecond that triggers fling.. 56 * The time constant used to calculate dampening in the low-pass filter of scroll velocity. 173 boolean onDrag(float displacement, float velocity); argument 175 void onDragEnd(float velocity, boolean fling); argument 293 Log.d(TAG, String.format("onDrag disp=%.1f, velocity=%.1f", 305 Log.d(TAG, String.format("onScrollEnd disp=%.1f, velocity=%.1f", 313 * Computes the damped velocity. 320 float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0; 322 mVelocity = velocity; 325 mVelocity = interpolate(mVelocity, velocity, alph 344 calculateDuration(float velocity, float progressNeeded) argument 359 setVelocityAtZero(float velocity) argument [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/anim/ |
H A D | SpringAnimationHandler.java | 37 * Supports setting either X or Y velocity on the list of springs added to this handler. 63 * Determines which direction we use to calculate and set the velocity. 138 * @param setVelocity If true, we set the velocity to {@link #mCurrentVelocity} before 164 * manually set the velocity. 166 public void animateToPositionWithVelocity(float position, int startValue, float velocity) { argument 169 + ", velocity=" + velocity); 172 mCurrentVelocity = velocity; 208 float velocity = isVerticalDirection() 211 velocity * [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/allapps/ |
H A D | AllAppsCaretController.java | 31 // The velocity at which the caret will peak (i.e. exhibit a 90 degree bend) 58 * defined by the {@link AllAppsTransitionController}. Uses the container's velocity to adjust 62 * @param velocity The velocity of the container 65 public void updateCaret(float containerProgress, float velocity, boolean dragging) { argument 66 // If we're in portrait and the shift is not 0 or 1, adjust the caret based on velocity 71 // How fast are we moving as a percentage of the peak velocity? 72 final float pctOfFlingVelocity = Math.max(-1, Math.min(velocity / PEAK_VELOCITY, 1));
|
H A D | AllAppsTransitionController.java | 42 * If release velocity > THRES1, snap according to the direction of movement. 43 * If release velocity < THRES1, snap according to either top or bottom depending on whether it's 197 public boolean onDrag(float displacement, float velocity) { argument 202 mContainerVelocity = velocity; 211 public void onDragEnd(float velocity, boolean fling) { argument 220 if (velocity < 0) { 221 calculateDuration(velocity, mAppsView.getTranslationY()); 236 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); 239 // snap to top or bottom using the release velocity 242 calculateDuration(velocity, Mat 365 calculateDuration(float velocity, float disp) argument [all...] |
H A D | AllAppsRecyclerView.java | 545 public boolean onDrag(float displacement, float velocity) { argument 583 public void onDragEnd(float velocity, boolean fling) { argument 591 // We calculate our own velocity to give the springs the desired effect. 592 float velocity = y / getDampedOverScroll(getHeight()) * MAX_RELEASE_VELOCITY; 593 // We want to negate the velocity because we are moving to 0 from -1 due to the 595 mSpringAnimationHandler.animateToPositionWithVelocity(0, -1, -velocity);
|
/packages/apps/Launcher3/src/com/android/launcher3/notification/ |
H A D | NotificationMainView.java | 144 public boolean onDrag(float displacement, float velocity) { argument 152 public void onDragEnd(float velocity, boolean fling) { argument 161 endTranslation = velocity < 0 ? - getWidth() : getWidth(); 171 interpolator.setVelocityAtZero(velocity); 173 long duration = SwipeDetector.calculateDuration(velocity,
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
H A D | WidgetsBottomSheet.java | 274 public boolean onDrag(float displacement, float velocity) { argument 290 public void onDragEnd(float velocity, boolean fling) { argument 291 if ((fling && velocity > 0) || getTranslationY() > (mTranslationYRange) / 2) { 292 mScrollInterpolator.setVelocityAtZero(velocity); 293 mOpenCloseAnimator.setDuration(SwipeDetector.calculateDuration(velocity, 298 mOpenCloseAnimator.setDuration(SwipeDetector.calculateDuration(velocity,
|
/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/Dialer/java/com/android/incallui/answer/impl/answermethod/ |
H A D | FlingUpDownTouchHandler.java | 207 * Sets whether fling velocity is used to affect accept/reject behavior 209 * @param flingEnabled whether fling velocity will be used when determining whether to 394 private void fling(float velocity, @FlingTarget int target, boolean centerBecauseOfFalsing) { argument 397 flingAnimationUtils.apply(animator, currentProgress, target, velocity); 399 flingAnimationUtils.applyDismissing(animator, currentProgress, target, velocity, 1); 402 velocity = 0; 404 if (velocity == 0) {
|
/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/Contacts/src/com/android/contacts/widget/ |
H A D | MultiShrinkScroller.java | 63 * order to track velocity, modify EdgeEffect color & perform the originally specified animations. 598 final float velocity = getCurrentVelocity(); 599 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { 600 fling(-velocity); 946 private void fling(float velocity) { argument 949 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, 951 if (velocity < 0 && mTransparentView.getHeight() <= 0) { 1302 * Interpolator that enforces a specific starting velocity. This is useful to avoid a
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/affordance/ |
H A D | SwipeButtonView.java | 193 public void finishAnimation(float velocity, @Nullable final Runnable mAnimationEndRunnable) { argument 202 animatorToRadius, circleRadius, maxCircleSize, velocity, maxCircleSize); 223 previewClipper, circleRadius, maxCircleSize, velocity, maxCircleSize);
|
/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;
|