Home
last modified time | relevance | path

Searched refs:mVelocityTracker (Results 1 – 25 of 36) sorted by relevance

12

/frameworks/support/design/src/android/support/design/widget/
DHeaderBehavior.java46 private VelocityTracker mVelocityTracker; field in HeaderBehavior
104 if (mVelocityTracker != null) { in onInterceptTouchEvent()
105 mVelocityTracker.recycle(); in onInterceptTouchEvent()
106 mVelocityTracker = null; in onInterceptTouchEvent()
112 if (mVelocityTracker != null) { in onInterceptTouchEvent()
113 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
167 if (mVelocityTracker != null) { in onTouchEvent()
168 mVelocityTracker.addMovement(ev); in onTouchEvent()
169 mVelocityTracker.computeCurrentVelocity(1000); in onTouchEvent()
170 float yvel = VelocityTrackerCompat.getYVelocity(mVelocityTracker, in onTouchEvent()
[all …]
DBottomSheetBehavior.java163 private VelocityTracker mVelocityTracker; field in BottomSheetBehavior
269 if (mVelocityTracker == null) { in onInterceptTouchEvent()
270 mVelocityTracker = VelocityTracker.obtain(); in onInterceptTouchEvent()
272 mVelocityTracker.addMovement(event); in onInterceptTouchEvent()
323 if (mVelocityTracker == null) { in onTouchEvent()
324 mVelocityTracker = VelocityTracker.obtain(); in onTouchEvent()
326 mVelocityTracker.addMovement(event); in onTouchEvent()
582 if (mVelocityTracker != null) { in reset()
583 mVelocityTracker.recycle(); in reset()
584 mVelocityTracker = null; in reset()
[all …]
/frameworks/support/compat/java/android/support/v4/view/
DGestureDetectorCompat.java100 private VelocityTracker mVelocityTracker; field in GestureDetectorCompat.GestureDetectorCompatImplBase
230 if (mVelocityTracker == null) { in onTouchEvent()
231 mVelocityTracker = VelocityTracker.obtain(); in onTouchEvent()
233 mVelocityTracker.addMovement(ev); in onTouchEvent()
267 mVelocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity); in onTouchEvent()
270 final float x1 = VelocityTrackerCompat.getXVelocity(mVelocityTracker, id1); in onTouchEvent()
271 final float y1 = VelocityTrackerCompat.getYVelocity(mVelocityTracker, id1); in onTouchEvent()
276 final float x = x1 * VelocityTrackerCompat.getXVelocity(mVelocityTracker, id2); in onTouchEvent()
277 final float y = y1 * VelocityTrackerCompat.getYVelocity(mVelocityTracker, id2); in onTouchEvent()
281 mVelocityTracker.clear(); in onTouchEvent()
[all …]
/frameworks/base/core/java/android/view/
DGestureDetector.java267 private VelocityTracker mVelocityTracker; field in GestureDetector
497 if (mVelocityTracker == null) { in onTouchEvent()
498 mVelocityTracker = VelocityTracker.obtain(); in onTouchEvent()
500 mVelocityTracker.addMovement(ev); in onTouchEvent()
534 mVelocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity); in onTouchEvent()
537 final float x1 = mVelocityTracker.getXVelocity(id1); in onTouchEvent()
538 final float y1 = mVelocityTracker.getYVelocity(id1); in onTouchEvent()
543 final float x = x1 * mVelocityTracker.getXVelocity(id2); in onTouchEvent()
544 final float y = y1 * mVelocityTracker.getYVelocity(id2); in onTouchEvent()
548 mVelocityTracker.clear(); in onTouchEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DNavigationBarGestureHelper.java76 private VelocityTracker mVelocityTracker; field in NavigationBarGestureHelper
167 mVelocityTracker = VelocityTracker.obtain(); in handleDragActionDownEvent()
168 mVelocityTracker.addMovement(event); in handleDragActionDownEvent()
187 mVelocityTracker.addMovement(event); in handleDragActionMoveEvent()
242 mVelocityTracker.addMovement(event); in handleDragActionUpEvent()
243 mVelocityTracker.computeCurrentVelocity(1000); in handleDragActionUpEvent()
250 ? mVelocityTracker.getXVelocity() in handleDragActionUpEvent()
251 : mVelocityTracker.getYVelocity(), in handleDragActionUpEvent()
254 mRecentsComponent.onDraggingInRecentsEnded(mVelocityTracker.getYVelocity()); in handleDragActionUpEvent()
257 mVelocityTracker.recycle(); in handleDragActionUpEvent()
[all …]
DPanelView.java87 private VelocityTrackerInterface mVelocityTracker; field in PanelView
207 if (mVelocityTracker != null) mVelocityTracker.addMovement(event); in trackMovement()
267 if (mVelocityTracker == null) { in onTouchEvent()
383 if (mVelocityTracker != null) { in endMotionEvent()
384 mVelocityTracker.computeCurrentVelocity(1000); in endMotionEvent()
385 vel = mVelocityTracker.getYVelocity(); in endMotionEvent()
387 mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); in endMotionEvent()
415 if (mVelocityTracker != null) { in endMotionEvent()
416 mVelocityTracker.recycle(); in endMotionEvent()
417 mVelocityTracker = null; in endMotionEvent()
[all …]
DKeyguardAffordanceHelper.java49 private VelocityTracker mVelocityTracker; field in KeyguardAffordanceHelper
222 if (mVelocityTracker != null) { in endMotion()
223 mVelocityTracker.recycle(); in endMotion()
224 mVelocityTracker = null; in endMotion()
471 if (mVelocityTracker != null) { in trackMovement()
472 mVelocityTracker.addMovement(event); in trackMovement()
477 if (mVelocityTracker != null) { in initVelocityTracker()
478 mVelocityTracker.recycle(); in initVelocityTracker()
480 mVelocityTracker = VelocityTracker.obtain(); in initVelocityTracker()
484 if (mVelocityTracker == null) { in getCurrentVelocity()
[all …]
/frameworks/base/core/jni/
Dandroid_view_VelocityTracker.cpp61 VelocityTracker mVelocityTracker; member in android::VelocityTrackerState
68 mVelocityTracker(strategy), mActivePointerId(-1) { in VelocityTrackerState()
72 mVelocityTracker.clear(); in clear()
78 mVelocityTracker.addMovement(event); in addMovement()
82 BitSet32 idBits(mVelocityTracker.getCurrentPointerIdBits()); in computeCurrentVelocity()
89 mVelocityTracker.getVelocity(id, &vx, &vy); in computeCurrentVelocity()
113 id = mVelocityTracker.getActivePointerId(); in getVelocity()
136 return mVelocityTracker.getEstimator(id, outEstimator); in getEstimator()
/frameworks/base/core/java/com/android/internal/widget/
DSwipeDismissLayout.java81 private VelocityTracker mVelocityTracker; field in SwipeDismissLayout
179 mVelocityTracker = VelocityTracker.obtain("int1"); in onInterceptTouchEvent()
180 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
203 if (mVelocityTracker == null || mDiscardIntercept) { in onInterceptTouchEvent()
233 if (mVelocityTracker == null || !mDismissable) { in onTouchEvent()
262 mVelocityTracker.addMovement(ev); in onTouchEvent()
303 if (mVelocityTracker != null) { in resetMembers()
304 mVelocityTracker.recycle(); in resetMembers()
306 mVelocityTracker = null; in resetMembers()
341 mVelocityTracker.computeCurrentVelocity(1000);
[all …]
DRotarySelector.java153 private VelocityTracker mVelocityTracker; field in RotarySelector
503 if (mVelocityTracker == null) { in onTouchEvent()
504 mVelocityTracker = VelocityTracker.obtain(); in onTouchEvent()
506 mVelocityTracker.addMovement(event); in onTouchEvent()
546 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent()
566 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent()
597 if (mVelocityTracker != null) { in onTouchEvent()
598 mVelocityTracker.recycle(); // wishin' we had generational GC in onTouchEvent()
599 mVelocityTracker = null; in onTouchEvent()
606 if (mVelocityTracker != null) { in onTouchEvent()
[all …]
DResolverDrawerLayout.java92 private final VelocityTracker mVelocityTracker; field in ResolverDrawerLayout
141 mVelocityTracker = VelocityTracker.obtain(); in ResolverDrawerLayout()
237 mVelocityTracker.clear(); in onInterceptTouchEvent()
240 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
288 mVelocityTracker.addMovement(ev); in onTouchEvent()
362 mVelocityTracker.computeCurrentVelocity(1000); in onTouchEvent()
363 final float yvel = mVelocityTracker.getYVelocity(mActivePointerId); in onTouchEvent()
411 mVelocityTracker.clear();
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DExpandHelper.java108 private VelocityTracker mVelocityTracker; field in ExpandHelper
344 if (mVelocityTracker == null) { in trackVelocity()
345 mVelocityTracker = VelocityTracker.obtain(); in trackVelocity()
347 mVelocityTracker.clear(); in trackVelocity()
349 mVelocityTracker.addMovement(event); in trackVelocity()
352 if (mVelocityTracker == null) { in trackVelocity()
353 mVelocityTracker = VelocityTracker.obtain(); in trackVelocity()
355 mVelocityTracker.addMovement(event); in trackVelocity()
363 if (mVelocityTracker != null && (event.getActionMasked() == MotionEvent.ACTION_CANCEL in maybeRecycleVelocityTracker()
365 mVelocityTracker.recycle(); in maybeRecycleVelocityTracker()
[all …]
DSwipeHelper.java67 private VelocityTracker mVelocityTracker; field in SwipeHelper
95 mVelocityTracker = VelocityTracker.obtain(); in SwipeHelper()
261 mVelocityTracker.clear(); in onInterceptTouchEvent()
267 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
295 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
546 mVelocityTracker.addMovement(ev);
579 mVelocityTracker.computeCurrentVelocity(1000 /* px/sec */, getMaxVelocity());
580 float velocity = getVelocity(mVelocityTracker);
639 float velocity = getVelocity(mVelocityTracker);
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
DTaskStackViewTouchHandler.java77 VelocityTracker mVelocityTracker; field in TaskStackViewTouchHandler
155 if (mVelocityTracker == null) { in initOrResetVelocityTracker()
156 mVelocityTracker = VelocityTracker.obtain(); in initOrResetVelocityTracker()
158 mVelocityTracker.clear(); in initOrResetVelocityTracker()
162 if (mVelocityTracker != null) { in recycleVelocityTracker()
163 mVelocityTracker.recycle(); in recycleVelocityTracker()
164 mVelocityTracker = null; in recycleVelocityTracker()
244 mVelocityTracker.addMovement(ev); in handleTouchEvent()
255 mVelocityTracker.addMovement(ev); in handleTouchEvent()
308 mVelocityTracker.addMovement(ev); in handleTouchEvent()
[all …]
/frameworks/base/docs/html/training/gestures/
Dmovement.jd107 private VelocityTracker mVelocityTracker = null;
116 if(mVelocityTracker == null) {
118 mVelocityTracker = VelocityTracker.obtain();
122 mVelocityTracker.clear();
125 mVelocityTracker.addMovement(event);
128 mVelocityTracker.addMovement(event);
132 mVelocityTracker.computeCurrentVelocity(1000);
136 VelocityTrackerCompat.getXVelocity(mVelocityTracker,
139 VelocityTrackerCompat.getYVelocity(mVelocityTracker,
145 mVelocityTracker.recycle();
/frameworks/native/libs/input/
DVelocityControl.cpp49 mVelocityTracker.clear(); in reset()
69 mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition); in move()
73 if (mVelocityTracker.getVelocity(0, &vx, &vy)) { in move()
/frameworks/support/core-ui/java/android/support/v4/widget/
DViewDragHelper.java126 private VelocityTracker mVelocityTracker; field in ViewDragHelper
504 if (mVelocityTracker != null) { in cancel()
505 mVelocityTracker.recycle(); in cancel()
506 mVelocityTracker = null; in cancel()
573 (int) VelocityTrackerCompat.getXVelocity(mVelocityTracker, mActivePointerId), in settleCapturedViewAt()
574 (int) VelocityTrackerCompat.getYVelocity(mVelocityTracker, mActivePointerId)); in settleCapturedViewAt()
706 (int) VelocityTrackerCompat.getXVelocity(mVelocityTracker, mActivePointerId), in flingCapturedView()
707 (int) VelocityTrackerCompat.getYVelocity(mVelocityTracker, mActivePointerId), in flingCapturedView()
963 if (mVelocityTracker == null) { in shouldInterceptTouchEvent()
964 mVelocityTracker = VelocityTracker.obtain(); in shouldInterceptTouchEvent()
[all …]
DNestedScrollView.java132 private VelocityTracker mVelocityTracker; field in NestedScrollView
580 if (mVelocityTracker == null) { in initOrResetVelocityTracker()
581 mVelocityTracker = VelocityTracker.obtain(); in initOrResetVelocityTracker()
583 mVelocityTracker.clear(); in initOrResetVelocityTracker()
588 if (mVelocityTracker == null) { in initVelocityTrackerIfNotExists()
589 mVelocityTracker = VelocityTracker.obtain(); in initVelocityTrackerIfNotExists()
594 if (mVelocityTracker != null) { in recycleVelocityTracker()
595 mVelocityTracker.recycle(); in recycleVelocityTracker()
596 mVelocityTracker = null; in recycleVelocityTracker()
658 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/helper/
DItemTouchHelper.java270 VelocityTracker mVelocityTracker; field in ItemTouchHelper
343 if (mVelocityTracker != null) {
344 mVelocityTracker.addMovement(event);
356 if (mVelocityTracker != null) {
357 mVelocityTracker.addMovement(event);
384 if (mVelocityTracker != null) {
385 mVelocityTracker.clear();
906 if (mVelocityTracker != null) { in obtainVelocityTracker()
907 mVelocityTracker.recycle(); in obtainVelocityTracker()
909 mVelocityTracker = VelocityTracker.obtain(); in obtainVelocityTracker()
[all …]
/frameworks/base/core/java/android/widget/
DHorizontalScrollView.java111 private VelocityTracker mVelocityTracker; field in HorizontalScrollView
427 if (mVelocityTracker == null) { in initOrResetVelocityTracker()
428 mVelocityTracker = VelocityTracker.obtain(); in initOrResetVelocityTracker()
430 mVelocityTracker.clear(); in initOrResetVelocityTracker()
435 if (mVelocityTracker == null) { in initVelocityTrackerIfNotExists()
436 mVelocityTracker = VelocityTracker.obtain(); in initVelocityTrackerIfNotExists()
441 if (mVelocityTracker != null) { in recycleVelocityTracker()
442 mVelocityTracker.recycle(); in recycleVelocityTracker()
443 mVelocityTracker = null; in recycleVelocityTracker()
507 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
[all …]
DScrollView.java117 private VelocityTracker mVelocityTracker; field in ScrollView
453 if (mVelocityTracker == null) { in initOrResetVelocityTracker()
454 mVelocityTracker = VelocityTracker.obtain(); in initOrResetVelocityTracker()
456 mVelocityTracker.clear(); in initOrResetVelocityTracker()
461 if (mVelocityTracker == null) { in initVelocityTrackerIfNotExists()
462 mVelocityTracker = VelocityTracker.obtain(); in initVelocityTrackerIfNotExists()
467 if (mVelocityTracker != null) { in recycleVelocityTracker()
468 mVelocityTracker.recycle(); in recycleVelocityTracker()
469 mVelocityTracker = null; in recycleVelocityTracker()
541 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
[all …]
DSlidingDrawer.java112 private VelocityTracker mVelocityTracker; field in SlidingDrawer
411 mVelocityTracker.addMovement(event); in onInterceptTouchEvent()
424 mVelocityTracker.addMovement(event); in onTouchEvent()
432 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent()
561 mVelocityTracker = VelocityTracker.obtain(); in prepareTracking()
692 if (mVelocityTracker != null) { in stopTracking()
693 mVelocityTracker.recycle(); in stopTracking()
694 mVelocityTracker = null; in stopTracking()
DStackView.java135 private VelocityTracker mVelocityTracker; field in StackView
724 if (mVelocityTracker == null) {
725 mVelocityTracker = VelocityTracker.obtain();
727 mVelocityTracker.addMovement(ev);
796 if (mVelocityTracker != null) {
797 mVelocityTracker.clear();
816 if (mVelocityTracker != null) {
817 mVelocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
818 mYVelocity = (int) mVelocityTracker.getYVelocity(mActivePointerId);
821 if (mVelocityTracker != null) {
[all …]
/frameworks/support/core-ui/java/android/support/v4/view/
DViewPager.java220 private VelocityTracker mVelocityTracker; field in ViewPager
2176 if (mVelocityTracker == null) {
2177 mVelocityTracker = VelocityTracker.obtain();
2179 mVelocityTracker.addMovement(ev);
2208 if (mVelocityTracker == null) {
2209 mVelocityTracker = VelocityTracker.obtain();
2211 mVelocityTracker.addMovement(ev);
2271 final VelocityTracker velocityTracker = mVelocityTracker;
2555 if (mVelocityTracker == null) {
2556 mVelocityTracker = VelocityTracker.obtain();
[all …]
/frameworks/native/include/input/
DVelocityControl.h102 VelocityTracker mVelocityTracker; variable

12