Home
last modified time | relevance | path

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

123

/frameworks/support/dynamic-animation/src/android/support/animation/
DFlingAnimation.java178 float getAcceleration(float value, float velocity) { in getAcceleration() argument
179 return mFlingForce.getAcceleration(value, velocity); in getAcceleration()
183 boolean isAtEquilibrium(float value, float velocity) { in isAtEquilibrium() argument
186 || mFlingForce.isAtEquilibrium(value, velocity); in isAtEquilibrium()
216 MassState updateValueAndVelocity(float value, float velocity, long deltaT) { in updateValueAndVelocity() argument
217 mMassState.mVelocity = (float) (velocity * Math.exp((deltaT / 1000f) * mFriction)); in updateValueAndVelocity()
218 mMassState.mValue = (float) (value - velocity / mFriction in updateValueAndVelocity()
219 + velocity / mFriction * Math.exp(mFriction * deltaT / 1000f)); in updateValueAndVelocity()
227 public float getAcceleration(float position, float velocity) { in getAcceleration() argument
228 return velocity * mFriction; in getAcceleration()
[all …]
DSpringAnimation.java256 float getAcceleration(float value, float velocity) { in getAcceleration() argument
257 return mSpring.getAcceleration(value, velocity); in getAcceleration()
261 boolean isAtEquilibrium(float value, float velocity) { in isAtEquilibrium() argument
262 return mSpring.isAtEquilibrium(value, velocity); in isAtEquilibrium()
DForce.java24 float getAcceleration(float position, float velocity); in getAcceleration() argument
26 boolean isAtEquilibrium(float value, float velocity); in isAtEquilibrium() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DFlingAnimationUtils.java106 public void apply(Animator animator, float currValue, float endValue, float velocity) { in apply() argument
107 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
120 float velocity) { in apply() argument
121 apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); in apply()
135 public void apply(Animator animator, float currValue, float endValue, float velocity, in apply() argument
137 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply()
155 float velocity, float maxDistance) { in apply() argument
156 AnimatorProperties properties = getProperties(currValue, endValue, velocity, in apply()
163 float endValue, float velocity, float maxDistance) { in getProperties() argument
167 float velAbs = Math.abs(velocity); in getProperties()
[all …]
DNotificationMenuRow.java229 public boolean onTouchEvent(View view, MotionEvent ev, float velocity) { in onTouchEvent() argument
274 return handleUpEvent(ev, view, velocity); in onTouchEvent()
283 private boolean handleUpEvent(MotionEvent ev, View animView, float velocity) { in handleUpEvent() argument
289 dismiss(animView, velocity); in handleUpEvent()
291 snapBack(animView, velocity); in handleUpEvent()
296 final boolean gestureTowardsMenu = isTowardsMenu(velocity); in handleUpEvent()
298 mSwipeHelper.getMinDismissVelocity() <= Math.abs(velocity); in handleUpEvent()
309 + " velocity= " + velocity in handleUpEvent()
339 showMenu(animView, menuSnapTarget, velocity); in handleUpEvent()
342 dismiss(animView, velocity); in handleUpEvent()
[all …]
/frameworks/base/core/java/android/widget/
DOverScroller.java657 static private float getDeceleration(int velocity) { in getDeceleration() argument
658 return velocity > 0 ? -GRAVITY : GRAVITY; in getDeceleration()
732 private void startSpringback(int start, int end, int velocity) { in startSpringback() argument
746 void fling(int start, int velocity, int min, int max, int over) { in fling() argument
749 mCurrVelocity = mVelocity = velocity; in fling()
755 startAfterEdge(start, min, max, velocity); in fling()
762 if (velocity != 0) { in fling()
763 mDuration = mSplineDuration = getSplineFlingDuration(velocity); in fling()
764 totalDistance = getSplineFlingDistance(velocity); in fling()
767 mSplineDistance = (int) (totalDistance * Math.signum(velocity)); in fling()
[all …]
DScroller.java444 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 …]
DSlidingDrawer.java456 float velocity = (float) Math.hypot(xVelocity, yVelocity); in onTouchEvent()
458 velocity = -velocity; in onTouchEvent()
464 if (Math.abs(velocity) < mMaximumTapVelocity) { in onTouchEvent()
481 performFling(vertical ? top : left, velocity, false, true); in onTouchEvent()
485 performFling(vertical ? top : left, velocity, false, true); in onTouchEvent()
488 performFling(vertical ? top : left, velocity, false, true); in onTouchEvent()
508 private void performFling(int position, float velocity, boolean always,
511 mAnimatedVelocity = velocity;
514 if (always || (velocity > mMaximumMajorVelocity ||
516 velocity > -mMaximumMajorVelocity))) {
[all …]
DEdgeEffect.java268 public void onAbsorb(int velocity) { in onAbsorb() argument
270 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); in onAbsorb()
273 mDuration = 0.15f + (velocity * 0.02f); in onAbsorb()
285 mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f) / 2, 1.f); in onAbsorb()
288 mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA)); in onAbsorb()
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/events/ui/
DDraggingInRecentsEndedEvent.java10 public final float velocity; field in DraggingInRecentsEndedEvent
12 public DraggingInRecentsEndedEvent(float velocity) { in DraggingInRecentsEndedEvent() argument
13 this.velocity = velocity; in DraggingInRecentsEndedEvent()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DSwipeHelper.java358 public void dismissChild(final View view, float velocity, boolean useAccelerateInterpolator) { in dismissChild() argument
359 dismissChild(view, velocity, null /* endAction */, 0 /* delay */, in dismissChild()
371 public void dismissChild(final View animView, float velocity, final Runnable endAction, in dismissChild() argument
379 boolean animateUpForMenu = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild()
382 boolean animateLeftForRtl = velocity == 0 && (getTranslation(animView) == 0 || isDismissAll) in dismissChild()
384 boolean animateLeft = (Math.abs(velocity) > getEscapeVelocity() && velocity < 0) || in dismissChild()
394 if (velocity != 0) { in dismissChild()
397 .abs(velocity)) in dismissChild()
425 newPos, velocity, getSize(animView)); in dismissChild()
471 public void snapChild(final View animView, final float targetLeft, float velocity) { in snapChild() argument
[all …]
DExpandHelper.java547 void finishExpanding(boolean forceAbort, float velocity) { in finishExpanding() argument
548 finishExpanding(forceAbort, velocity, true /* allowAnimation */); in finishExpanding()
557 private void finishExpanding(boolean forceAbort, float velocity, boolean allowAnimation) { in finishExpanding() argument
567 nowExpanded = currentHeight > mOldHeight && velocity >= 0; in finishExpanding()
569 nowExpanded = currentHeight >= mOldHeight || velocity > 0; in finishExpanding()
608 velocity = nowExpanded == velocity >= 0 ? velocity : 0; in finishExpanding()
609 mFlingAnimationUtils.apply(mScaleAnimation, currentHeight, targetHeight, velocity); in finishExpanding()
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/
DNotificationSwipeActionHelper.java37 public void dismiss(View animView, float velocity); in dismiss() argument
42 public void snap(View animView, float velocity, float targetLeft); in snap() argument
57 public boolean swipedFastEnough(float translation, float velocity); in swipedFastEnough() argument
/frameworks/base/core/jni/
Dandroid_view_VelocityTracker.cpp105 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/v7/recyclerview/tests/src/android/support/v7/widget/
DGridLayoutManagerSnappingTest.java118 int velocity = (int) (1.000001 * mRecyclerView.getMinFlingVelocity()); in snapOnFlingSameView() local
119 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingSameView()
144 int velocity = (int) (0.25 * mRecyclerView.getMaxFlingVelocity()); in snapOnFlingNextView() local
145 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingNextView()
DLinearLayoutManagerSnappingTest.java140 int velocity = (int) (1.000001 * mRecyclerView.getMinFlingVelocity()); in snapOnFlingSameView() local
141 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingSameView()
165 int velocity = (int) (0.2 * mRecyclerView.getMaxFlingVelocity()); in snapOnFlingNextView() local
166 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingNextView()
DStaggeredGridLayoutManagerSnappingTest.java158 int velocity = (int) (1.000001 * mRecyclerView.getMinFlingVelocity()); in snapOnFlingSameView() local
159 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingSameView()
184 int velocity = (int) (0.2 * mRecyclerView.getMaxFlingVelocity()); in snapOnFlingNextView() local
185 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingNextView()
DPagerSnapHelperTest.java133 int velocity = (int) (1.000001 * mRecyclerView.getMinFlingVelocity()); in snapOnFlingSameView() local
134 int velocityDir = mReverseScroll ? -velocity : velocity; in snapOnFlingSameView()
179 private void runSnapOnMaxFlingNextView(int velocity) throws Throwable { in runSnapOnMaxFlingNextView() argument
184 int velocityDir = mReverseScroll ? -velocity : velocity; in runSnapOnMaxFlingNextView()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DLockscreenGestureLogger.java46 public void write(int gesture, int length, int velocity) { in write() argument
50 .addTaggedData(MetricsEvent.FIELD_GESTURE_VELOCITY, velocity)); in write()
52 EventLogTags.writeSysuiLockscreenGesture(safeLookup(gesture), length, velocity); in write() local
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
DTaskStackViewScroller.java205 void scrollToClosestTask(int velocity) { in scrollToClosestTask() argument
216 if (Math.abs(velocity) > flingThreshold) { in scrollToClosestTask()
224 -velocity, minY, maxY, 0 /* overscroll */); in scrollToClosestTask()
228 velocity); in scrollToClosestTask()
231 algorithm.percentageToScroll(newScrollP), velocity); in scrollToClosestTask()
236 mLayoutAlgorithm.mNumStackTasks, velocity); in scrollToClosestTask()
/frameworks/base/core/java/com/android/internal/policy/
DDividerSnapAlgorithm.java146 public SnapTarget calculateSnapTarget(int position, float velocity) { in calculateSnapTarget() argument
147 return calculateSnapTarget(position, velocity, true /* hardDismiss */); in calculateSnapTarget()
155 public SnapTarget calculateSnapTarget(int position, float velocity, boolean hardDismiss) { in calculateSnapTarget() argument
156 if (position < mFirstSplitTarget.position && velocity < -mMinDismissVelocityPxPerSecond) { in calculateSnapTarget()
159 if (position > mLastSplitTarget.position && velocity > mMinDismissVelocityPxPerSecond) { in calculateSnapTarget()
162 if (Math.abs(velocity) < mMinFlingVelocityPxPerSecond) { in calculateSnapTarget()
165 if (velocity < 0) { in calculateSnapTarget()
/frameworks/native/libs/vr/libdvr/include/dvr/
Ddvr_pose.h36 float32x4_t velocity; member
83 float32x4_t velocity; member
/frameworks/support/compat/java/android/support/v4/widget/
DEdgeEffectCompat.java207 public boolean onAbsorb(int velocity) { in onAbsorb() argument
208 mEdgeEffect.onAbsorb(velocity); in onAbsorb()
/frameworks/support/dynamic-animation/tests/src/android/support/dynamicanimation/tests/
DSpringTests.java122 public void onAnimationUpdate(DynamicAnimation animation, float value, float velocity) { in testFloatValueHolder()
184 float velocity) { in testDampingRatioOverAndCriticallyDamped()
252 float velocity) { in testDampingRatioUnderDamped()
254 if (velocity > 0 && velocity1 < 0) { in testDampingRatioUnderDamped()
257 velocity1 = velocity; in testDampingRatioUnderDamped()
259 velocity2 = velocity; in testDampingRatioUnderDamped()
260 if (velocity > 0 && velocity2 < 0) { in testDampingRatioUnderDamped()
468 public void onAnimationUpdate(DynamicAnimation animation, float value, float velocity) { in testSetMinMax()
657 float velocity) { in testAllProperties()
787 float velocity) { in onAnimationEnd() argument
DFlingTests.java186 public void onAnimationUpdate(DynamicAnimation animation, float value, float velocity) { in testVelocityThreshold()
187 if (velocity != 0f) { in testVelocityThreshold()
189 assertTrue(velocity >= highThreshold); in testVelocityThreshold()

123