Home
last modified time | relevance | path

Searched refs:velocity (Results 1 – 25 of 39) sorted by relevance

12

/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DOverScroller.java659 static private float getDeceleration(int velocity) { in getDeceleration() argument
660 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration()
734 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument
748 void fling(int start, int velocity, int min, int max, int over) { in fling() argument
751 mCurrVelocity = mVelocity = velocity; in fling()
757 startAfterEdge(start, min, max, velocity); in fling()
764 if (velocity != 0) { in fling()
765 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling()
766 totalDistance = getSplineFlingDistance(velocity); in fling()
769 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling()
[all …]
DScroller.java391 float velocity = (float) Math.hypot(velocityX, velocityY); in fling() local
393 mVelocity = velocity; in fling()
394 final double l = Math.log(START_TENSION * velocity / ALPHA); in fling()
400 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling()
401 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/utils/
DFlingAnimationUtils.java64 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument
65 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
78 ViewPropertyAnimator animator, float currValue, float endValue, float velocity) { in apply() argument
79 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
94 Animator animator, float currValue, float endValue, float velocity, float maxDistance) { in apply() argument
95 AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); in apply()
115 float velocity, in apply() argument
117 AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); in apply()
123 float currValue, float endValue, float velocity, float maxDistance) { in getProperties() argument
127 float velAbs = Math.abs(velocity); in getProperties()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/notification/
DFlingAnimationUtils.java109 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument
110 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
123 float velocity) { in apply() argument
124 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
138 public void apply(Animator animator, float currValue, float endValue, float velocity, in apply() argument
140 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply()
158 float velocity, float maxDistance) { in apply() argument
159 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply()
166 float endValue, float velocity, float maxDistance) { in getProperties() argument
170 float velAbs = Math.abs(velocity); in getProperties()
[all …]
DSwipeHelper.java329 public void dismissChild(final View view, float velocity, boolean useAccelerateInterpolator) { in dismissChild() argument
330 dismissChild(view, velocity, null /* endAction */, 0 /* delay */, in dismissChild()
342 public void dismissChild(final View animView, float velocity, final Runnable endAction, in dismissChild() argument
350 boolean animateUpForMenu = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild()
353 boolean animateLeftForRtl = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild()
355 boolean animateLeft = velocity < 0 in dismissChild()
356 || (velocity == 0 && getTranslation(animView) < 0 && !isDismissAll); in dismissChild()
366 if (velocity != 0) { in dismissChild()
369 .abs(velocity)) in dismissChild()
396 newPos, velocity, getSize(animView)); in dismissChild()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DLauncherScroller.java428 float velocity = (float) Math.hypot(velocityX, velocityY); in fling() local
430 mVelocity = velocity; in fling()
431 mDuration = getSplineFlingDuration(velocity); in fling()
436 float coeffX = velocity == 0 ? 1.0f : velocityX / velocity; in fling()
437 float coeffY = velocity == 0 ? 1.0f : velocityY / velocity; in fling()
439 double totalDistance = getSplineFlingDistance(velocity); in fling()
440 mDistance = (int) (totalDistance * Math.signum(velocity)); in fling()
458 private double getSplineDeceleration(float velocity) { in getSplineDeceleration() argument
459 return Math.log(INFLEXION * Math.abs(velocity) / (mFlingFriction * mPhysicalCoeff)); in getSplineDeceleration()
462 private int getSplineFlingDuration(float velocity) { in getSplineFlingDuration() argument
[all …]
DPagedView.java1852 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument
1860 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity()
1875 velocity = Math.abs(velocity); in snapToPageWithVelocity()
1876 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity()
1881 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DSwipeHelper.java266 private void dismissChild(final SwipeableItemView view, float velocity) { in dismissChild() argument
269 float newPos = determinePos(animView, velocity); in dismissChild()
270 int duration = determineDuration(animView, newPos, velocity); in dismissChild()
293 private static int determineDuration(View animView, float newPos, float velocity) { in determineDuration() argument
295 if (velocity != 0) { in determineDuration()
299 .abs(velocity))); in determineDuration()
306 private float determinePos(View animView, float velocity) { in determinePos() argument
308 if (velocity < 0 || (velocity == 0 && animView.getTranslationX() < 0) in determinePos()
310 || (velocity == 0 && animView.getTranslationX() == 0 && mSwipeDirection == Y)) { in determinePos()
406 float velocity = getVelocity(mVelocityTracker); in onTouchEvent() local
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DVerticalPullDetector.java122 boolean onDrag(float displacement, float velocity); in onDrag() argument
124 void onDragEnd(float velocity, boolean fling); in onDragEnd() argument
256 float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0; in computeVelocity() local
258 mVelocity = velocity; in computeVelocity()
261 mVelocity = interpolate(mVelocity, velocity, alpha); in computeVelocity()
280 public long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument
282 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration()
286 … Log.d(TAG, String.format("calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration()
295 public void setVelocityAtZero(float velocity) { in setVelocityAtZero() argument
296 mSteeper = velocity > FAST_FLING_PX_MS; in setVelocityAtZero()
DAllAppsTransitionController.java177 public boolean onDrag(float displacement, float velocity) { in onDrag() argument
182 mContainerVelocity = velocity; in onDrag()
191 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument
197 if (velocity < 0) { in onDragEnd()
198 calculateDuration(velocity, mAppsView.getTranslationY()); in onDragEnd()
210 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd()
216 calculateDuration(velocity, Math.abs(mShiftRange - mAppsView.getTranslationY())); in onDragEnd()
219 calculateDuration(velocity, Math.abs(mAppsView.getTranslationY())); in onDragEnd()
315 private void calculateDuration(float velocity, float disp) { in calculateDuration() argument
316 mAnimationDuration = mDetector.calculateDuration(velocity, disp / mShiftRange); in calculateDuration()
DAllAppsCaretController.java64 public void updateCaret(float containerProgress, float velocity, boolean dragging) { in updateCaret() argument
71 final float pctOfFlingVelocity = Math.max(-1, Math.min(velocity / PEAK_VELOCITY, 1)); in updateCaret()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DEdgeEffect.java264 public void onAbsorb(int velocity) { in onAbsorb() argument
266 velocity = Math.max(MIN_VELOCITY, Math.abs(velocity)); in onAbsorb()
269 mDuration = 0.1f + (velocity * 0.03f); in onAbsorb()
282 mEdgeAlphaFinish = Math.max(0, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1)); in onAbsorb()
285 HELD_EDGE_SCALE_Y, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1.f)); in onAbsorb()
291 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f), 1.75f); in onAbsorb()
294 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
DPaper.java45 public void edgeReached(float velocity) { in edgeReached() argument
46 velocity /= mWidth; // make it relative to width in edgeReached()
47 if (velocity < 0) { in edgeReached()
48 mAnimationRight.onAbsorb(-velocity); in edgeReached()
50 mAnimationLeft.onAbsorb(velocity); in edgeReached()
145 public void onAbsorb(float velocity) { in onAbsorb() argument
146 float finish = Utils.clamp(mValue + velocity * VELOCITY_FACTOR, in onAbsorb()
DFlingScroller.java85 double velocity = Math.hypot(velocityX, velocityY); in fling() local
86 mSinAngle = velocityY / velocity; in fling()
87 mCosAngle = velocityX / velocity; in fling()
97 * Math.pow(Math.abs(velocity), 1.0 / (DECELERATED_FACTOR - 1))); in fling()
101 velocity * mDuration / DECELERATED_FACTOR / 1000); in fling()
DScrollerHelper.java74 public void fling(int velocity, int min, int max) { in fling() argument
78 velocity, 0, // velocityX, velocityY in fling()
DEdgeView.java126 public void onAbsorb(int velocity, int direction) { in onAbsorb() argument
127 mEffect[direction].onAbsorb(velocity); in onAbsorb()
/packages/apps/Launcher2/src/com/android/launcher2/
DSmoothPagedView.java119 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument
121 super.snapToPageWithVelocity(whichPage, velocity); in snapToPageWithVelocity()
127 private void snapToPageWithVelocity(int whichPage, int velocity, boolean settle) { in snapToPageWithVelocity() argument
147 velocity = Math.abs(velocity); in snapToPageWithVelocity()
148 if (velocity > 0) { in snapToPageWithVelocity()
149 duration += (duration / (velocity / mBaseLineFlingVelocity)) * mFlingVelocityInfluence; in snapToPageWithVelocity()
DPagedView.java1517 protected void snapToPageWithVelocity(int whichPage, int velocity) { in snapToPageWithVelocity() argument
1528 if (Math.abs(velocity) < mMinFlingVelocity) { in snapToPageWithVelocity()
1543 velocity = Math.abs(velocity); in snapToPageWithVelocity()
1544 velocity = Math.max(mMinSnapVelocity, velocity); in snapToPageWithVelocity()
1549 duration = 4 * Math.round(1000 * Math.abs(distance / velocity)); in snapToPageWithVelocity()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DLauncherEdgeEffect.java238 public void onAbsorb(int velocity) { in onAbsorb() argument
240 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); in onAbsorb()
243 mDuration = 0.15f + (velocity * 0.02f); in onAbsorb()
255 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f) / 2, 1.f); in onAbsorb()
258 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DWidgetsBottomSheet.java266 public boolean onDrag(float displacement, float velocity) { in onDrag() argument
273 public void onDragEnd(float velocity, boolean fling) { in onDragEnd() argument
274 if ((fling && velocity > 0) || getTranslationY() > (mTranslationYRange) / 2) { in onDragEnd()
275 mScrollInterpolator.setVelocityAtZero(velocity); in onDragEnd()
276 mOpenCloseAnimator.setDuration(mVerticalPullDetector.calculateDuration(velocity, in onDragEnd()
281 mOpenCloseAnimator.setDuration(mVerticalPullDetector.calculateDuration(velocity, in onDragEnd()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/answermethod/
DFlingUpDownTouchHandler.java394 private void fling(float velocity, @FlingTarget int target, boolean centerBecauseOfFalsing) { in fling() argument
397 flingAnimationUtils.apply(animator, currentProgress, target, velocity); in fling()
399 flingAnimationUtils.applyDismissing(animator, currentProgress, target, velocity, 1); in fling()
402 velocity = 0; in fling()
404 if (velocity == 0) { in fling()
/packages/apps/Contacts/src/com/android/contacts/widget/
DMultiShrinkScroller.java598 final float velocity = getCurrentVelocity(); in stopDrag() local
599 if (velocity > mMinimumVelocity || velocity < -mMinimumVelocity) { in stopDrag()
600 fling(-velocity); in stopDrag()
946 private void fling(float velocity) { in fling() argument
949 mScroller.fling(0, getScroll(), 0, (int) velocity, 0, 0, -Integer.MAX_VALUE, in fling()
951 if (velocity < 0 && mTransparentView.getHeight() <= 0) { in fling()
/packages/apps/Messaging/src/com/android/messaging/ui/conversationlist/
DConversationListSwipeHelper.java430 private long calculateTranslationDuration(final float deltaPosition, final float velocity) { in calculateTranslationDuration() argument
431 Assert.isTrue(velocity != 0); in calculateTranslationDuration()
432 final float durationInSeconds = Math.abs(deltaPosition / velocity); in calculateTranslationDuration()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/affordance/
DSwipeButtonView.java193 public void finishAnimation(float velocity, @Nullable final Runnable mAnimationEndRunnable) { in finishAnimation() argument
202 animatorToRadius, circleRadius, maxCircleSize, velocity, maxCircleSize); in finishAnimation()
223 previewClipper, circleRadius, maxCircleSize, velocity, maxCircleSize); in finishAnimation()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
DScrollController.java812 float velocity = mFlingScroller.getCurrVelocity(); in startScroll() local
813 float velocityX = velocity * curDx / hyp; in startScroll()
814 float velocityY = velocity * curDy / hyp; in startScroll()

12