Searched refs:scrollVector (Results 1 - 4 of 4) sorted by relevance

/frameworks/base/core/java/com/android/internal/widget/
H A DLinearSmoothScroller.java232 PointF scrollVector = computeScrollVectorForPosition(getTargetPosition());
233 if (scrollVector == null || (scrollVector.x == 0 && scrollVector.y == 0)) {
239 normalize(scrollVector);
240 mTargetVector = scrollVector;
242 mInterimTargetDx = (int) (TARGET_SEEK_SCROLL_DISTANCE_PX * scrollVector.x);
243 mInterimTargetDy = (int) (TARGET_SEEK_SCROLL_DISTANCE_PX * scrollVector.y);
H A DRecyclerView.java10782 * @param scrollVector The vector that points to the target scroll position
10784 protected void normalize(PointF scrollVector) { argument
10785 final double magnitude = Math.sqrt(scrollVector.x * scrollVector.x + scrollVector.y
10786 * scrollVector.y);
10787 scrollVector.x /= magnitude;
10788 scrollVector.y /= magnitude;
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DLinearSmoothScroller.java233 PointF scrollVector = computeScrollVectorForPosition(getTargetPosition());
234 if (scrollVector == null || (scrollVector.x == 0 && scrollVector.y == 0)) {
240 normalize(scrollVector);
241 mTargetVector = scrollVector;
243 mInterimTargetDx = (int) (TARGET_SEEK_SCROLL_DISTANCE_PX * scrollVector.x);
244 mInterimTargetDy = (int) (TARGET_SEEK_SCROLL_DISTANCE_PX * scrollVector.y);
H A DRecyclerView.java11684 * @param scrollVector The vector that points to the target scroll position
11686 protected void normalize(@NonNull PointF scrollVector) { argument
11687 final float magnitude = (float) Math.sqrt(scrollVector.x * scrollVector.x
11688 + scrollVector.y * scrollVector.y);
11689 scrollVector.x /= magnitude;
11690 scrollVector.y /= magnitude;

Completed in 58 milliseconds