/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | FlingAnimationUtils.java | 75 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument 76 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply() 89 float velocity) { in apply() argument 90 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply() 104 public void apply(Animator animator, float currValue, float endValue, float velocity, in apply() argument 106 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply() 124 float velocity, float maxDistance) { in apply() argument 125 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply() 132 float endValue, float velocity, float maxDistance) { in getProperties() argument 136 float velAbs = Math.abs(velocity); in getProperties() [all …]
|
D | KeyguardAffordanceView.java | 205 public void finishAnimation(float velocity, final Runnable mAnimationEndRunnable) { in finishAnimation() argument 219 velocity, maxCircleSize); in finishAnimation() 235 velocity, maxCircleSize); in finishAnimation()
|
/frameworks/base/core/java/android/widget/ |
D | OverScroller.java | 655 static private float getDeceleration(int velocity) { in getDeceleration() argument 656 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration() 730 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument 744 void fling(int start, int velocity, int min, int max, int over) { in fling() argument 747 mCurrVelocity = mVelocity = velocity; in fling() 753 startAfterEdge(start, min, max, velocity); in fling() 760 if (velocity != 0) { in fling() 761 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling() 762 totalDistance = getSplineFlingDistance(velocity); in fling() 765 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling() [all …]
|
D | Scroller.java | 444 float velocity = (float) Math.hypot(velocityX, velocityY); in fling() local 446 mVelocity = velocity; in fling() 447 mDuration = getSplineFlingDuration(velocity); in fling() 452 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling() 453 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling() 455 double totalDistance = getSplineFlingDistance(velocity); in fling() 456 mDistance = (int) (totalDistance * Math.signum(velocity)); in fling() 474 private double getSplineDeceleration(float velocity) { in getSplineDeceleration() argument 475 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff)); in getSplineDeceleration() 478 private int getSplineFlingDuration(float velocity) { in getSplineFlingDuration() argument [all …]
|
D | SlidingDrawer.java | 460 float velocity = (float) Math.hypot(xVelocity, yVelocity); in onTouchEvent() 462 velocity = -velocity; in onTouchEvent() 468 if (Math.abs(velocity) < mMaximumTapVelocity) { in onTouchEvent() 485 performFling(vertical ? top : left, velocity, false); in onTouchEvent() 489 performFling(vertical ? top : left, velocity, false); in onTouchEvent() 492 performFling(vertical ? top : left, velocity, false); in onTouchEvent() 512 private void performFling(int position, float velocity, boolean always) { 514 mAnimatedVelocity = velocity; 517 if (always || (velocity > mMaximumMajorVelocity || 519 velocity > -mMaximumMajorVelocity))) { [all …]
|
D | EdgeEffect.java | 267 public void onAbsorb(int velocity) { in onAbsorb() argument 269 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); in onAbsorb() 272 mDuration = 0.15f + (velocity * 0.02f); in onAbsorb() 284 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f) / 2, 1.f); in onAbsorb() 287 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
|
D | StackView.java | 1040 float getDurationForNeutralPosition(float velocity) { 1041 return getDuration(false, velocity); 1044 float getDurationForOffscreenPosition(float velocity) { 1045 return getDuration(true, velocity); 1048 private float getDuration(boolean invert, float velocity) { 1055 if (velocity == 0) { 1058 float duration = invert ? d / Math.abs(velocity) : 1059 (maxd - d) / Math.abs(velocity);
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/ |
D | SwipeHelper.java | 220 private void dismissChild(final View view, float velocity) { in dismissChild() argument 223 if (velocity < 0 in dismissChild() 224 || (velocity == 0 && getTranslation(view) < 0) in dismissChild() 226 || (velocity == 0 && getTranslation(view) == 0 && mSwipeDirection == Y)) { in dismissChild() 232 if (velocity != 0) { in dismissChild() 235 1000f / Math.abs(velocity))); in dismissChild() 263 private void snapChild(final View view, float velocity) { in snapChild() argument 353 float velocity = getVelocity(velocityTracker); in endSwipe() local 360 boolean childSwipedFastEnough = (Math.abs(velocity) > escapeVelocity) && in endSwipe() 361 (Math.abs(velocity) > Math.abs(perpendicularVelocity)) && in endSwipe() [all …]
|
D | TaskStackViewTouchHandler.java | 303 int velocity = (int) mVelocityTracker.getYVelocity(mActivePointerId); in onTouchEvent() local 304 if (mIsScrolling && (Math.abs(velocity) > mMinimumVelocity)) { in onTouchEvent() 305 float overscrollRangePct = Math.abs((float) velocity / mMaximumVelocity); in onTouchEvent() 311 0, velocity, in onTouchEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | SwipeHelper.java | 297 public void dismissChild(final View view, float velocity) { in dismissChild() argument 298 dismissChild(view, velocity, null, 0, false, 0); in dismissChild() 309 public void dismissChild(final View view, float velocity, final Runnable endAction, in dismissChild() argument 316 if (velocity < 0 in dismissChild() 317 || (velocity == 0 && getTranslation(animView) < 0) in dismissChild() 319 || (velocity == 0 && getTranslation(animView) == 0 && mSwipeDirection == Y) in dismissChild() 321 || (velocity == 0 && getTranslation(animView) == 0 && isLayoutRtl)) { in dismissChild() 329 if (velocity != 0) { in dismissChild() 332 .abs(velocity)) in dismissChild() 369 public void snapChild(final View view, float velocity) { in snapChild() argument [all …]
|
D | ExpandHelper.java | 522 private void finishExpanding(boolean force, float velocity) { in finishExpanding() argument 552 mFlingAnimationUtils.apply(mScaleAnimation, currentHeight, targetHeight, velocity); in finishExpanding()
|
/frameworks/base/docs/html/training/gestures/ |
D | movement.jd | 17 <li><a href="#velocity">Track Velocity</a></li> 81 <li>The velocity of the pointer as it moves across the touch screen.</li> 87 <h2 id="velocity">Track Velocity</h2> 89 …that is simply based on the distance and/or direction the pointer traveled. But velocity often is a 91 whether the gesture occurred. To make velocity calculation easier, Android 96 android.view.VelocityTracker} helps you track the velocity of touch events. This 97 is useful for gestures in which velocity is part of the criteria for the 117 // Retrieve a new VelocityTracker object to watch the velocity of a motion. 121 // Reset the velocity tracker back to its initial state. 129 // When you want to determine the velocity, call [all …]
|
D | viewgroup.jd | 182 These methods return the minimum and maximum velocity (respectively) to initiate a fling,
|
/frameworks/support/v4/java/android/support/v4/widget/ |
D | EdgeEffectCompat.java | 53 public boolean onAbsorb(Object edgeEffect, int velocity); in onAbsorb() argument 84 public boolean onAbsorb(Object edgeEffect, int velocity) { in onAbsorb() argument 122 public boolean onAbsorb(Object edgeEffect, int velocity) { in onAbsorb() argument 123 return EdgeEffectCompatIcs.onAbsorb(edgeEffect, velocity); in onAbsorb() 239 public boolean onAbsorb(int velocity) { in onAbsorb() argument 240 return IMPL.onAbsorb(mEdgeEffect, velocity); in onAbsorb()
|
D | ViewDragHelper.java | 624 private int computeAxisDuration(int delta, int velocity, int motionRange) { in computeAxisDuration() argument 636 velocity = Math.abs(velocity); in computeAxisDuration() 637 if (velocity > 0) { in computeAxisDuration() 638 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in computeAxisDuration()
|
/frameworks/base/core/jni/ |
D | android_view_VelocityTracker.cpp | 105 Velocity& velocity = mCalculatedVelocity[index]; in computeCurrentVelocity() local 106 velocity.vx = vx; in computeCurrentVelocity() 107 velocity.vy = vy; in computeCurrentVelocity() 119 const Velocity& velocity = mCalculatedVelocity[index]; in getVelocity() local 120 vx = velocity.vx; in getVelocity() 121 vy = velocity.vy; in getVelocity()
|
/frameworks/support/v4/ics/android/support/v4/widget/ |
D | EdgeEffectCompatIcs.java | 56 public static boolean onAbsorb(Object edgeEffect, int velocity) { in onAbsorb() argument 57 ((EdgeEffect) edgeEffect).onAbsorb(velocity); in onAbsorb()
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | RotarySelector.java | 551 final int velocity = Math.max(mMinimumVelocity, rawVelocity); in onTouchEvent() local 554 Math.abs(velocity / mDimpleSpacing)); in onTouchEvent() 558 velocity); in onTouchEvent() 571 final int velocity = Math.min(-mMinimumVelocity, rawVelocity); in onTouchEvent() local 574 Math.abs(velocity / mDimpleSpacing)); in onTouchEvent() 578 velocity); in onTouchEvent()
|
D | ResolverDrawerLayout.java | 408 private void smoothScrollTo(int yOffset, float velocity) { 423 velocity = Math.abs(velocity); 424 if (velocity > 0) { 425 duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
|
D | ViewPager.java | 519 boolean setCurrentItemInternal(int item, boolean smoothScroll, boolean always, int velocity) { in setCurrentItemInternal() argument 555 scrollToItem(item, smoothScroll, velocity, dispatchSelected); in setCurrentItemInternal() 561 private void scrollToItem(int position, boolean smoothScroll, int velocity, in scrollToItem() argument 566 smoothScrollTo(destX, 0, velocity); in scrollToItem() 789 void smoothScrollTo(int x, int y, int velocity) { in smoothScrollTo() argument 816 velocity = Math.abs(velocity); in smoothScrollTo() 817 if (velocity > 0) { in smoothScrollTo() 818 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in smoothScrollTo() 2232 private int determineTargetPage(int currentPage, float pageOffset, int velocity, int deltaX) { 2234 if (Math.abs(deltaX) > mFlingDistance && Math.abs(velocity) > mMinimumVelocity) { [all …]
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | ViewPager.java | 517 void setCurrentItemInternal(int item, boolean smoothScroll, boolean always, int velocity) { in setCurrentItemInternal() argument 553 scrollToItem(item, smoothScroll, velocity, dispatchSelected); in setCurrentItemInternal() 557 private void scrollToItem(int item, boolean smoothScroll, int velocity, in scrollToItem() argument 567 smoothScrollTo(destX, 0, velocity); in scrollToItem() 826 void smoothScrollTo(int x, int y, int velocity) { in smoothScrollTo() argument 853 velocity = Math.abs(velocity); in smoothScrollTo() 854 if (velocity > 0) { in smoothScrollTo() 855 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in smoothScrollTo() 2237 private int determineTargetPage(int currentPage, float pageOffset, int velocity, int deltaX) { 2239 if (Math.abs(deltaX) > mFlingDistance && Math.abs(velocity) > mMinimumVelocity) { [all …]
|
/frameworks/base/docs/html/training/custom-views/ |
D | making-interactive.jd | 158 <p>To start a fling, call {@link android.widget.Scroller#fling fling()} with the starting velocity 160 maximum x and y values of the fling. For the velocity value, you can use the value computed for 171 <p class="note"><strong>Note:</strong> Although the velocity calculated by 175 velocity by a factor of
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | KeyguardAffordanceHelper.java | 367 private void startFinishingCircleAnimation(float velocity, Runnable mAnimationEndRunnable) { 369 targetView.finishAnimation(velocity, mAnimationEndRunnable);
|
D | NotificationPanelView.java | 952 public void flingTopOverscroll(float velocity, boolean open) { in flingTopOverscroll() argument 955 flingSettings(!mQsExpansionEnabled && open ? 0f : velocity, open && mQsExpansionEnabled, in flingTopOverscroll()
|
/frameworks/ex/widget/java/com/android/ex/widget/ |
D | StaggeredGridView.java | 365 final float velocity = VelocityTrackerCompat.getYVelocity(mVelocityTracker, in onTouchEvent() local 367 if (Math.abs(velocity) > mFlingVelocity) { // TODO in onTouchEvent() 369 mScroller.fling(0, 0, 0, (int) velocity, 0, 0, in onTouchEvent()
|