Searched refs:targetPosition (Results 1 - 19 of 19) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/widget/listview/touch/
H A DListSetSelectionTest.java64 final int targetPosition = mListView.getAdapter().getCount() / 2;
68 mListView.setSelection(targetPosition);
77 if (child.getId() == targetPosition) {
94 final int targetPosition = mListView.getAdapter().getCount() / 2;
98 mListView.setSelectionFromTop(targetPosition, 100);
108 if (child.getId() == targetPosition) {
/frameworks/base/core/tests/coretests/src/android/widget/gridview/touch/
H A DGridTouchSetSelectionTest.java62 final int targetPosition = mGridView.getAdapter().getCount() / 2;
66 mGridView.setSelection(targetPosition);
75 if (child.getId() == targetPosition) {
/frameworks/support/room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/
H A DRoomPagedListActivity.java84 final int targetPosition = layoutManager.findFirstVisibleItemPosition();
87 Customer customer = list.get(targetPosition);
96 int absolutePosition = targetPosition + list.getPositionOffset();
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DSnapHelper.java166 int targetPosition = findTargetSnapPosition(layoutManager, velocityX, velocityY);
167 if (targetPosition == RecyclerView.NO_POSITION) {
171 smoothScroller.setTargetPosition(targetPosition);
H A DLinearLayoutManager.java455 public PointF computeScrollVectorForPosition(int targetPosition) { argument
460 final int direction = targetPosition < firstChildPos != mShouldReverseLayout ? -1 : 1;
H A DRecyclerView.java11500 public void setTargetPosition(int targetPosition) { argument
11501 mTargetPosition = targetPosition;
11510 * @param targetPosition the position to which the scroller is scrolling
11515 public PointF computeScrollVectorForPosition(int targetPosition) { argument
11519 .computeScrollVectorForPosition(targetPosition);
11799 * @param targetPosition The target item position to scroll to using instant scrolling.
11801 public void jumpTo(int targetPosition) { argument
11802 mJumpToPosition = targetPosition;
11931 * @param targetPosition the target position to which the returned vector should point
11936 PointF computeScrollVectorForPosition(int targetPosition); argument
[all...]
H A DStaggeredGridLayoutManager.java2053 public PointF computeScrollVectorForPosition(int targetPosition) { argument
2054 final int direction = calculateScrollDirectionForPosition(targetPosition);
/frameworks/base/core/java/com/android/internal/widget/
H A DLinearSmoothScroller.java346 * @param targetPosition the position to which the scroller is scrolling
351 public PointF computeScrollVectorForPosition(int targetPosition) { argument
355 .computeScrollVectorForPosition(targetPosition);
H A DLinearLayoutManager.java443 public PointF computeScrollVectorForPosition(int targetPosition) { argument
448 final int direction = targetPosition < firstChildPos != mShouldReverseLayout ? -1 : 1;
H A DRecyclerView.java10643 public void setTargetPosition(int targetPosition) { argument
10644 mTargetPosition = targetPosition;
10894 * @param targetPosition The target item position to scroll to using instant scrolling.
10896 public void jumpTo(int targetPosition) { argument
10897 mJumpToPosition = targetPosition;
11022 * @param targetPosition the target position to which the returned vector should point
11026 PointF computeScrollVectorForPosition(int targetPosition); argument
/frameworks/base/services/core/java/com/android/server/wm/
H A DTaskStack.java620 final int targetPosition = findPositionForTask(child, position, showForAllUsers,
622 super.positionChildAt(targetPosition, child, includingParents);
628 final int toTop = targetPosition == mChildren.size() - 1 ? 1 : 0;
629 EventLog.writeEvent(EventLogTags.WM_TASK_MOVED, child.mTaskId, toTop, targetPosition);
634 private int findPositionForTask(Task task, int targetPosition, boolean showForAllUsers, argument
650 if (targetPosition == POSITION_BOTTOM && minPosition == 0) {
652 } else if (targetPosition == POSITION_TOP
657 return Math.min(Math.max(targetPosition, minPosition), maxPosition);
H A DDisplayContent.java3413 final int targetPosition = findPositionForStack(position, child, false /* adding */);
3414 super.positionChildAt(targetPosition, child, includingParents);
3432 int targetPosition = requestedPosition;
3446 targetPosition = adding ? topChildPosition : topChildPosition - 1;
3449 return targetPosition;
/frameworks/base/core/java/android/widget/
H A DGallery.java1294 int targetPosition = mSelectedPosition + direction;
1296 if (mItemCount > 0 && targetPosition >= 0 && targetPosition < mItemCount) {
1297 scrollToChild(targetPosition - mFirstPosition);
H A DSwitch.java1046 final float targetPosition = newCheckedState ? 1 : 0;
1047 mPositionAnimator = ObjectAnimator.ofFloat(this, THUMB_POS, targetPosition);
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/
H A DLinearLayoutManagerTest.java1017 final int targetPosition;
1019 targetPosition = mLayoutManager.findFirstVisibleItemPosition();
1021 targetPosition = mLayoutManager.findLastVisibleItemPosition();
1025 .findViewHolderForLayoutPosition(targetPosition);
1085 .findViewHolderForLayoutPosition(targetPosition);
H A DRecyclerViewLayoutTest.java2965 public PointF computeScrollVectorForPosition(int targetPosition) {
2994 final int targetPosition = visibleChildCount * (removeItem ? 30 : 4);
2998 rv.smoothScrollToPosition(targetPosition);
3002 Log.d(TAG, "scrolling to target position " + targetPosition);
3006 final int newTarget = targetPosition - 10;
3040 rv.findViewHolderForLayoutPosition(targetPosition));
3161 public PointF computeScrollVectorForPosition(int targetPosition) {
4958 public PointF computeScrollVectorForPosition(int targetPosition) {
5066 public PointF computeScrollVectorForPosition(int targetPosition) {
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/
H A DSwitchCompat.java1021 final float targetPosition = newCheckedState ? 1 : 0;
1022 mPositionAnimator = ObjectAnimator.ofFloat(this, THUMB_POS, targetPosition);
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/
H A DGridLayoutManager.java282 // consumePendingMovesXXX() sets real targetPosition.
369 public PointF computeScrollVectorForPosition(int targetPosition) { argument
2726 public PointF computeScrollVectorForPosition(int targetPosition) {
2734 ? targetPosition > firstChildPos
2735 : targetPosition < firstChildPos;
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/
H A DGridWidgetTest.java3479 int targetPosition = items.length - 1;
3480 mGridView.setSelectedPositionSmooth(targetPosition);
3489 assertEquals(mGridView.getSelectedPosition(), targetPosition);
3490 assertSame(mGridView.getLayoutManager().findViewByPosition(targetPosition),

Completed in 459 milliseconds