Home
last modified time | relevance | path

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

123

/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/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/Launcher3/src/com/android/launcher3/touch/
DBaseSwipeDetector.java80 public static long calculateDuration(float velocity, float progressNeeded) { in calculateDuration() argument
82 float velocityDivisor = Math.max(2f, Math.abs(0.5f * velocity)); in calculateDuration()
87 "calculateDuration=%d, v=%f, d=%f", duration, velocity, progressNeeded)); in calculateDuration()
122 public boolean isFling(float velocity) { in isFling() argument
123 return Math.abs(velocity) > RELEASE_VELOCITY_PX_MS; in isFling()
270 PointF velocity = new PointF(mVelocityTracker.getXVelocity() / 1000, in reportDragEnd() local
273 velocity.x = -velocity.x; in reportDragEnd()
277 mDisplacement, velocity)); in reportDragEnd()
280 reportDragEndInternal(velocity); in reportDragEnd()
283 protected abstract void reportDragEndInternal(PointF velocity); in reportDragEndInternal() argument
DAbstractStateChangeTouchController.java265 public void onDragEnd(float velocity) { in onDragEnd() argument
272 boolean fling = mDetector.isFling(velocity); in onDragEnd()
281 final float progressVelocity = velocity * mProgressMultiplier; in onDragEnd()
285 Float.compare(Math.signum(velocity), Math.signum(mProgressMultiplier)) == 0 in onDragEnd()
298 ? LauncherAnimUtils.blockedFlingDurationFactor(velocity) : 1; in onDragEnd()
308 duration = BaseSwipeDetector.calculateDuration(velocity, in onDragEnd()
324 duration = BaseSwipeDetector.calculateDuration(velocity, in onDragEnd()
334 updateSwipeCompleteAnimation(anim, duration, targetState, velocity, fling); in onDragEnd()
341 mLauncher.getAppsView().addSpringFromFlingUpdateListener(anim, velocity, progress); in onDragEnd()
348 LauncherState targetState, float velocity, boolean isFling) { in updateSwipeCompleteAnimation() argument
[all …]
DSeascapePagedViewHandler.java77 public void adjustFloatingIconStartVelocity(PointF velocity) { in adjustFloatingIconStartVelocity() argument
78 float oldX = velocity.x; in adjustFloatingIconStartVelocity()
79 float oldY = velocity.y; in adjustFloatingIconStartVelocity()
80 velocity.set(oldY, -oldX); in adjustFloatingIconStartVelocity()
DBothAxesSwipeDetector.java86 protected void reportDragEndInternal(PointF velocity) { in reportDragEndInternal() argument
87 mListener.onDragEnd(velocity); in reportDragEndInternal()
97 void onDragEnd(PointF velocity); in onDragEnd() argument
DSingleAxisSwipeDetector.java183 protected void reportDragEndInternal(PointF velocity) { in reportDragEndInternal() argument
184 float velocityComponent = mDir.extractDirection(velocity); in reportDragEndInternal()
208 void onDragEnd(float velocity); in onDragEnd() argument
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/
DNoButtonQuickSwitchTouchController.java294 public void onDragEnd(PointF velocity) { in onDragEnd() argument
295 boolean horizontalFling = mSwipeDetector.isFling(velocity.x); in onDragEnd()
296 boolean verticalFling = mSwipeDetector.isFling(velocity.y); in onDragEnd()
317 if (velocity.x < 0) { in onDragEnd()
321 if (velocity.y > 0) { in onDragEnd()
327 targetState = Math.abs(velocity.x) > Math.abs(velocity.y) in onDragEnd()
332 targetState = velocity.x > 0 ? QUICK_SWITCH : NORMAL; in onDragEnd()
334 targetState = velocity.y > 0 ? QUICK_SWITCH : NORMAL; in onDragEnd()
347 + velocity.x * getSingleFrameMs(mLauncher) / mXRange, 0f, 1f); in onDragEnd()
349 long xDuration = BaseSwipeDetector.calculateDuration(velocity.x, in onDragEnd()
[all …]
DTaskViewTouchController.java325 public void onDragEnd(float velocity) { in onDragEnd() argument
327 velocity = mOverrideVelocity; in onDragEnd()
333 velocity = Utilities.boundToRange(velocity, -maxTaskDismissDragVelocity, in onDragEnd()
335 boolean fling = mDetector.isFling(velocity); in onDragEnd()
345 boolean goingUp = orientationHandler.isGoingUp(velocity, mIsRtl); in onDragEnd()
351 velocity, goingToEnd ? (1 - progress) : progress); in onDragEnd()
353 animationDuration *= LauncherAnimUtils.blockedFlingDurationFactor(velocity); in onDragEnd()
363 velocity * orientationHandler.getSecondaryTranslationDirectionFactor(), in onDragEnd()
DNoButtonNavbarToOverviewTouchController.java141 public void onDragEnd(float velocity) { in onDragEnd() argument
143 goToOverviewOrHomeOnDragEnd(velocity); in onDragEnd()
145 super.onDragEnd(velocity); in onDragEnd()
159 LauncherState targetState, float velocity, boolean isFling) { in updateSwipeCompleteAnimation() argument
160 super.updateSwipeCompleteAnimation(animator, expectedDuration, targetState, velocity, in updateSwipeCompleteAnimation()
230 private void goToOverviewOrHomeOnDragEnd(float velocity) { in goToOverviewOrHomeOnDragEnd() argument
234 .animateWithVelocity(velocity); in goToOverviewOrHomeOnDragEnd()
DNavBarToHomeTouchController.java185 public void onDragEnd(float velocity) { in onDragEnd() argument
186 boolean fling = mSwipeDetector.isFling(velocity); in onDragEnd()
190 || (velocity < 0 && fling); in onDragEnd()
199 .animateWithVelocity(velocity); in onDragEnd()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
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()
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()
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()
/packages/apps/Launcher3/src/com/android/launcher3/views/
DAbstractSlideInView.java169 public void onDragEnd(float velocity) { in onDragEnd() argument
170 if ((mSwipeDetector.isFling(velocity) && velocity > 0) || mTranslationShift > 0.5f) { in onDragEnd()
171 mScrollInterpolator = scrollInterpolatorForVelocity(velocity); in onDragEnd()
173 velocity, TRANSLATION_SHIFT_CLOSED - mTranslationShift)); in onDragEnd()
179 BaseSwipeDetector.calculateDuration(velocity, mTranslationShift)) in onDragEnd()
DSpringRelativeLayout.java86 protected void absorbSwipeUpVelocity(int velocity) { in absorbSwipeUpVelocity() argument
87 mEdgeGlowBottom.onAbsorb(velocity); in absorbSwipeUpVelocity()
136 public void onAbsorb(int velocity) { in onAbsorb() argument
137 mParent.onAbsorb(velocity); in onAbsorb()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java1244 int velocity = (int) mOrientationHandler.getPrimaryVelocity(velocityTracker, in onTouchEvent() local
1254 boolean isFling = passedSlop && shouldFlingForVelocity(velocity); in onTouchEvent()
1256 boolean isVelocityLeft = mIsRtl ? velocity > 0 : velocity < 0; in onTouchEvent()
1258 Log.d("Quickswitch", "isFling=false vel=" + velocity in onTouchEvent()
1268 Math.signum(velocity) != Math.signum(delta) && isFling) { in onTouchEvent()
1281 snapToPageWithVelocity(finalPage, velocity); in onTouchEvent()
1287 snapToPageWithVelocity(finalPage, velocity); in onTouchEvent()
1305 int velocity1 = -velocity; in onTouchEvent()
1344 protected boolean shouldFlingForVelocity(int velocity) { in shouldFlingForVelocity() argument
1346 return Math.abs(velocity) > threshold; in shouldFlingForVelocity()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/anim/
DInterpolators.java135 public static Interpolator scrollInterpolatorForVelocity(float velocity) { in scrollInterpolatorForVelocity() argument
136 return Math.abs(velocity) > FAST_FLING_PX_MS ? SCROLL : SCROLL_CUBIC; in scrollInterpolatorForVelocity()
143 public static Interpolator overshootInterpolatorForVelocity(float velocity) { in overshootInterpolatorForVelocity() argument
144 return new OvershootInterpolator(Math.min(Math.abs(velocity), 3f)); in overshootInterpolatorForVelocity()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DStaggeredWorkspaceAnim.java75 public StaggeredWorkspaceAnim(Launcher launcher, float velocity, boolean animateOverviewScrim, in StaggeredWorkspaceAnim() argument
77 this(launcher, velocity, animateOverviewScrim, ignoredView, true); in StaggeredWorkspaceAnim()
80 public StaggeredWorkspaceAnim(Launcher launcher, float velocity, boolean animateOverviewScrim, in StaggeredWorkspaceAnim() argument
85 mVelocity = velocity; in StaggeredWorkspaceAnim()
89 float transFactor = 0.2f + 0.9f * Math.abs(velocity) / MAX_VELOCITY_PX_PER_S; in StaggeredWorkspaceAnim()
DTriggerSwipeUpTouchTracker.java138 float velocity = mNavBarPosition.isRightEdge() in onGestureEnd() local
144 final boolean wasFling = Math.abs(velocity) >= mMinFlingVelocity; in onGestureEnd()
147 isSwipeUp = velocity > 0; in onGestureEnd()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/window/
DOverlayPanelViewController.java291 protected void animatePanel(float velocity, boolean isClosing) { in animatePanel() argument
298 animate(from, to, velocity, isClosing); in animatePanel()
318 velocity, in animatePanel()
341 private void animate(float from, float to, float velocity, boolean isClosing) { in animate() argument
372 getFlingAnimationUtils().apply(animator, from, to, Math.abs(velocity)); in animate()
/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/Launcher3/quickstep/src/com/android/quickstep/interaction/
DNavBarGestureHandler.java294 private void startAssistant(PointF velocity) { in startAssistant() argument
296 mGestureCallback.onNavBarGestureAttempted(ASSISTANT_COMPLETED, velocity); in startAssistant()
334 PointF velocity = new PointF(velocityX, velocityY); in onFling() local
338 velocity); in onFling()
342 startAssistant(velocity); in onFling()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DAbsSwipeUpHandler.java833 public void onGestureEnded(float endVelocity, PointF velocity, PointF downPos) {
839 boolean isVelocityVertical = Math.abs(velocity.y) > Math.abs(velocity.x);
841 mLogDirectionUpOrLeft = velocity.y < 0;
843 mLogDirectionUpOrLeft = velocity.x < 0;
846 handleNormalGestureEnd(endVelocity, isFling, velocity, false /* isCancel */);
909 private GestureEndTarget calculateEndTarget(PointF velocity, float endVelocity, boolean isFling,
953 goingToNewTask && Math.abs(velocity.x) > Math.abs(endVelocity);
975 private void handleNormalGestureEnd(float endVelocity, boolean isFling, PointF velocity,
979 final GestureEndTarget endTarget = calculateEndTarget(velocity, endVelocity,
993 startShift = Utilities.boundToRange(currentShift - velocity.y
[all …]

123