/frameworks/support/car/src/main/java/androidx/car/widget/ |
D | PagedSnapHelper.java | 68 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, in calculateDistanceToFinalSnap() argument 72 out[0] = layoutManager.canScrollHorizontally() in calculateDistanceToFinalSnap() 73 ? getHorizontalHelper(layoutManager).getDecoratedStart(targetView) in calculateDistanceToFinalSnap() 76 out[1] = layoutManager.canScrollVertically() in calculateDistanceToFinalSnap() 77 ? getVerticalHelper(layoutManager).getDecoratedStart(targetView) in calculateDistanceToFinalSnap() 100 public View findSnapView(RecyclerView.LayoutManager layoutManager) { in findSnapView() argument 101 int childCount = layoutManager.getChildCount(); in findSnapView() 106 OrientationHelper orientationHelper = getOrientationHelper(layoutManager); in findSnapView() 110 View firstChild = layoutManager.getChildAt(0); in findSnapView() 128 View lastVisibleChild = layoutManager.getChildAt(childCount - 1); in findSnapView() [all …]
|
D | PagedListView.java | 258 RecyclerView.LayoutManager layoutManager = in init() local 260 mRecyclerView.setLayoutManager(layoutManager); in init() 524 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in scrollToPosition() local 525 if (layoutManager == null) { in scrollToPosition() 529 RecyclerView.SmoothScroller smoothScroller = mSnapHelper.createScroller(layoutManager); in scrollToPosition() 532 layoutManager.startSmoothScroll(smoothScroller); in scrollToPosition() 547 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in snapToPosition() local 549 if (layoutManager == null) { in snapToPosition() 554 if ((layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) { in snapToPosition() 555 PointF vector = ((RecyclerView.SmoothScroller.ScrollVectorProvider) layoutManager) in snapToPosition() [all …]
|
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/ |
D | LinearSnapHelper.java | 45 @NonNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) { in calculateDistanceToFinalSnap() 47 if (layoutManager.canScrollHorizontally()) { in calculateDistanceToFinalSnap() 48 out[0] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap() 49 getHorizontalHelper(layoutManager)); in calculateDistanceToFinalSnap() 54 if (layoutManager.canScrollVertically()) { in calculateDistanceToFinalSnap() 55 out[1] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap() 56 getVerticalHelper(layoutManager)); in calculateDistanceToFinalSnap() 64 public int findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, in findTargetSnapPosition() argument 66 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) { in findTargetSnapPosition() 70 final int itemCount = layoutManager.getItemCount(); in findTargetSnapPosition() [all …]
|
D | PagerSnapHelper.java | 50 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, in calculateDistanceToFinalSnap() argument 53 if (layoutManager.canScrollHorizontally()) { in calculateDistanceToFinalSnap() 54 out[0] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap() 55 getHorizontalHelper(layoutManager)); in calculateDistanceToFinalSnap() 60 if (layoutManager.canScrollVertically()) { in calculateDistanceToFinalSnap() 61 out[1] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap() 62 getVerticalHelper(layoutManager)); in calculateDistanceToFinalSnap() 71 public View findSnapView(RecyclerView.LayoutManager layoutManager) { in findSnapView() argument 72 if (layoutManager.canScrollVertically()) { in findSnapView() 73 return findCenterView(layoutManager, getVerticalHelper(layoutManager)); in findSnapView() [all …]
|
D | SnapHelper.java | 65 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in onFling() local 66 if (layoutManager == null) { in onFling() 75 && snapFromFling(layoutManager, velocityX, velocityY); in onFling() 155 private boolean snapFromFling(@NonNull RecyclerView.LayoutManager layoutManager, int velocityX, in snapFromFling() argument 157 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) { in snapFromFling() 161 RecyclerView.SmoothScroller smoothScroller = createScroller(layoutManager); in snapFromFling() 166 int targetPosition = findTargetSnapPosition(layoutManager, velocityX, velocityY); in snapFromFling() 172 layoutManager.startSmoothScroll(smoothScroller); in snapFromFling() 185 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in snapToTargetExistingView() local 186 if (layoutManager == null) { in snapToTargetExistingView() [all …]
|
D | LinearSmoothScroller.java | 303 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDyToMakeVisible() local 304 if (layoutManager == null || !layoutManager.canScrollVertically()) { in calculateDyToMakeVisible() 309 final int top = layoutManager.getDecoratedTop(view) - params.topMargin; in calculateDyToMakeVisible() 310 final int bottom = layoutManager.getDecoratedBottom(view) + params.bottomMargin; in calculateDyToMakeVisible() 311 final int start = layoutManager.getPaddingTop(); in calculateDyToMakeVisible() 312 final int end = layoutManager.getHeight() - layoutManager.getPaddingBottom(); in calculateDyToMakeVisible() 328 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDxToMakeVisible() local 329 if (layoutManager == null || !layoutManager.canScrollHorizontally()) { in calculateDxToMakeVisible() 334 final int left = layoutManager.getDecoratedLeft(view) - params.leftMargin; in calculateDxToMakeVisible() 335 final int right = layoutManager.getDecoratedRight(view) + params.rightMargin; in calculateDxToMakeVisible() [all …]
|
D | OrientationHelper.java | 46 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { in OrientationHelper() argument 47 mLayoutManager = layoutManager; in OrientationHelper() 240 RecyclerView.LayoutManager layoutManager, @RecyclerView.Orientation int orientation) { in createOrientationHelper() argument 243 return createHorizontalHelper(layoutManager); in createOrientationHelper() 245 return createVerticalHelper(layoutManager); in createOrientationHelper() 257 RecyclerView.LayoutManager layoutManager) { in createHorizontalHelper() argument 258 return new OrientationHelper(layoutManager) { in createHorizontalHelper() 355 public static OrientationHelper createVerticalHelper(RecyclerView.LayoutManager layoutManager) { 356 return new OrientationHelper(layoutManager) {
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | LinearSmoothScroller.java | 302 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDyToMakeVisible() local 303 if (layoutManager == null || !layoutManager.canScrollVertically()) { in calculateDyToMakeVisible() 308 final int top = layoutManager.getDecoratedTop(view) - params.topMargin; in calculateDyToMakeVisible() 309 final int bottom = layoutManager.getDecoratedBottom(view) + params.bottomMargin; in calculateDyToMakeVisible() 310 final int start = layoutManager.getPaddingTop(); in calculateDyToMakeVisible() 311 final int end = layoutManager.getHeight() - layoutManager.getPaddingBottom(); in calculateDyToMakeVisible() 327 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDxToMakeVisible() local 328 if (layoutManager == null || !layoutManager.canScrollHorizontally()) { in calculateDxToMakeVisible() 333 final int left = layoutManager.getDecoratedLeft(view) - params.leftMargin; in calculateDxToMakeVisible() 334 final int right = layoutManager.getDecoratedRight(view) + params.rightMargin; in calculateDxToMakeVisible() [all …]
|
D | OrientationHelper.java | 47 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { in OrientationHelper() argument 48 mLayoutManager = layoutManager; in OrientationHelper() 233 RecyclerView.LayoutManager layoutManager, int orientation) { in createOrientationHelper() argument 236 return createHorizontalHelper(layoutManager); in createOrientationHelper() 238 return createVerticalHelper(layoutManager); in createOrientationHelper() 250 RecyclerView.LayoutManager layoutManager) { in createHorizontalHelper() argument 251 return new OrientationHelper(layoutManager) { in createHorizontalHelper() 348 public static OrientationHelper createVerticalHelper(RecyclerView.LayoutManager layoutManager) { 349 return new OrientationHelper(layoutManager) {
|
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/test/ |
D | RecyclerViewTest.java | 83 RecyclerView.LayoutManager layoutManager = view.getLayoutManager(); in inflation() local 84 assertNotNull("LayoutManager not created.", layoutManager); in inflation() 86 layoutManager.getClass().getName(), GridLayoutManager.class.getName()); in inflation() 87 GridLayoutManager gridLayoutManager = ((GridLayoutManager) layoutManager); in inflation() 94 layoutManager = view.getLayoutManager(); in inflation() 95 assertNotNull("LayoutManager not created.", layoutManager); in inflation() 97 layoutManager.getClass().getName(), in inflation() 100 (CustomLayoutManager) layoutManager; in inflation() 106 layoutManager = view.getLayoutManager(); in inflation() 107 assertNotNull("LayoutManager not created.", layoutManager); in inflation() [all …]
|
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ |
D | LinearLayoutManagerSavedStateTest.java | 99 layoutManager().expectLayouts(1); in params() 101 layoutManager().waitForLayout(2); in params() 112 layoutManager().expectLayouts(1); in params() 115 layoutManager().waitForLayout(2); in params() 126 layoutManager().expectLayouts(1); in params() 129 layoutManager().waitForLayout(2); in params() 151 layoutManager().setOrientation(config.mOrientation); in params() 168 layoutManager().setStackFromEnd(config.mStackFromEnd); in params() 185 layoutManager().setReverseLayout(config.mReverseLayout); in params() 202 layoutManager().setRecycleChildrenOnDetach(config.mRecycleChildrenOnDetach); in params() [all …]
|
D | RecyclerViewOnGenericMotionEventTest.java | 61 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in rotaryEncoderVerticalScroll() local 62 mRecyclerView.setLayoutManager(layoutManager); in rotaryEncoderVerticalScroll() 73 MockLayoutManager layoutManager = new MockLayoutManager(true, false); in rotaryEncoderHorizontalScroll() local 74 mRecyclerView.setLayoutManager(layoutManager); in rotaryEncoderHorizontalScroll() 83 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in pointerVerticalScroll() local 84 mRecyclerView.setLayoutManager(layoutManager); in pointerVerticalScroll() 93 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in pointerHorizontalScroll() local 94 mRecyclerView.setLayoutManager(layoutManager); in pointerHorizontalScroll()
|
D | RecyclerViewAccessibilityLifecycleTest.java | 173 final TestLayoutManager layoutManager = new TestLayoutManager() { in notClearCustomViewDelegate() local 201 layoutManager.expectLayouts(1); in notClearCustomViewDelegate() 204 recyclerView.setLayoutManager(layoutManager); in notClearCustomViewDelegate() 212 layoutManager.waitForLayout(1); in notClearCustomViewDelegate() 237 layoutManager.expectLayouts(1); in notClearCustomViewDelegate() 239 layoutManager.waitForLayout(1); in notClearCustomViewDelegate() 269 final TestLayoutManager layoutManager = new TestLayoutManager() { in clearItemDelegateWhenGoesToPool() local 281 layoutManager.expectLayouts(1); in clearItemDelegateWhenGoesToPool() 284 recyclerView.setLayoutManager(layoutManager); in clearItemDelegateWhenGoesToPool() 292 layoutManager.waitForLayout(1); in clearItemDelegateWhenGoesToPool() [all …]
|
D | StaggeredGridLayoutManagerSavedStateTest.java | 76 layoutManager().expectLayouts(1); in getParams() 78 layoutManager().waitForLayout(2); in getParams() 89 layoutManager().expectLayouts(1); in getParams() 92 layoutManager().waitForLayout(2); in getParams() 103 layoutManager().expectLayouts(1); in getParams() 106 layoutManager().waitForLayout(2); in getParams() 236 public WrappedLayoutManager layoutManager() { in layoutManager() method in StaggeredGridLayoutManagerSavedStateTest.PostLayoutRunnable
|
D | GridLayoutManagerNoOpUpdateTest.java | 112 RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); in getChildBounds() local 114 Rect rect = new Rect(layoutManager.getDecoratedLeft(child) - lp.leftMargin, in getChildBounds() 115 layoutManager.getDecoratedTop(child) - lp.topMargin, in getChildBounds() 116 layoutManager.getDecoratedRight(child) + lp.rightMargin, in getChildBounds() 117 layoutManager.getDecoratedBottom(child) + lp.bottomMargin); in getChildBounds()
|
D | RecyclerViewBasicTest.java | 95 MockLayoutManager layoutManager = new MockLayoutManager(); in layoutWithoutAdapter() local 96 mRecyclerView.setLayoutManager(layoutManager); in layoutWithoutAdapter() 99 0, layoutManager.mLayoutCount); in layoutWithoutAdapter() 175 MockLayoutManager layoutManager = new MockLayoutManager(); in layoutSimple() local 176 mRecyclerView.setLayoutManager(layoutManager); in layoutSimple() 180 + " layout manager's layout method", 1, layoutManager.mLayoutCount); in layoutSimple() 202 MockLayoutManager layoutManager = new MockLayoutManager(); in adapterChangeCallbacks() local 203 mRecyclerView.setLayoutManager(layoutManager); in adapterChangeCallbacks() 206 layoutManager.assertPrevNextAdapters(null, adapterOld); in adapterChangeCallbacks() 210 layoutManager.assertPrevNextAdapters("switching adapters should trigger correct callbacks" in adapterChangeCallbacks() [all …]
|
D | RecyclerViewSmoothScrollerTest.java | 41 RecyclerView.LayoutManager layoutManager = mock(RecyclerView.LayoutManager.class); in stop_whileRunning_isRunningIsFalseInOnStop() local 42 recyclerView.setLayoutManager(layoutManager); in stop_whileRunning_isRunningIsFalseInOnStop() 45 mockSmoothScroller.start(recyclerView, layoutManager); in stop_whileRunning_isRunningIsFalseInOnStop()
|
D | BaseWrapContentTest.java | 72 RecyclerView.LayoutManager layoutManager = createLayoutManager(); in unspecifiedWithHintTest() local 82 rv.setLayoutManager(layoutManager); in unspecifiedWithHintTest() 151 RecyclerView.LayoutManager layoutManager = scenario.createLayoutManager(); in runScenario() local 154 recyclerView.setLayoutManager(layoutManager); in runScenario() 156 mLayoutManager = layoutManager; in runScenario() 227 abstract protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager); in getVerticalGravity() argument 229 abstract protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager); in getHorizontalGravity() argument 454 RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); in getChildBounds() local 456 Rect rect = new Rect(layoutManager.getDecoratedLeft(child) - lp.leftMargin, in getChildBounds() 457 layoutManager.getDecoratedTop(child) - lp.topMargin, in getChildBounds() [all …]
|
D | RecyclerViewAnimationsTest.java | 235 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithoutPredictive() 241 super.beforePostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithoutPredictive() 246 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithoutPredictive() 248 super.afterPostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithoutPredictive() 289 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithPredictive() 292 super.beforePostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithPredictive() 297 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithPredictive() 299 super.afterPostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithPredictive() 413 AnimationLayoutManager layoutManager, in reuseHiddenViewWithProperPredictive() 416 super.afterPreLayout(recycler, layoutManager, state); in reuseHiddenViewWithProperPredictive() [all …]
|
D | LinearLayoutManagerWrapContentTest.java | 158 protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager) { in getVerticalGravity() argument 169 protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager) { in getHorizontalGravity() argument 170 boolean rtl = layoutManager.getLayoutDirection() == ViewCompat.LAYOUT_DIRECTION_RTL; in getHorizontalGravity()
|
D | RecyclerViewAccessibilityTest.java | 251 final DumbLayoutManager layoutManager = new DumbLayoutManager(); in ignoreAccessibilityIfAdapterHasChanged() local 254 recyclerView.setLayoutManager(layoutManager); in ignoreAccessibilityIfAdapterHasChanged() 255 layoutManager.expectLayouts(1); in ignoreAccessibilityIfAdapterHasChanged() 257 layoutManager.waitForLayout(1); in ignoreAccessibilityIfAdapterHasChanged()
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/ |
D | RvCompatListActivity.java | 34 RecyclerView.LayoutManager layoutManager; field in RvCompatListActivity.RecyclerViewFragment 43 recyclerView.setLayoutManager(layoutManager); in onCreateView() 56 fragment.layoutManager = createLayoutManager(this); in onCreate()
|
/frameworks/support/car/src/androidTest/java/androidx/car/widget/ |
D | DividerVisibilityManagerTest.java | 103 RecyclerView.LayoutManager layoutManager = in setCustomDividerVisibilityManager() local 114 for (int i = 0; i < layoutManager.getChildCount(); i++) { in setCustomDividerVisibilityManager() 115 views[i] = layoutManager.getChildAt(i); in setCustomDividerVisibilityManager() 131 for (int i = 0; i < layoutManager.getChildCount(); i++) { in setCustomDividerVisibilityManager() 132 views[i] = layoutManager.getChildAt(i); in setCustomDividerVisibilityManager()
|
/frameworks/support/recyclerview-selection/src/main/java/androidx/recyclerview/selection/ |
D | DefaultBandHost.java | 122 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in getColumnCount() local 123 if (layoutManager instanceof GridLayoutManager) { in getColumnCount() 124 return ((GridLayoutManager) layoutManager).getSpanCount(); in getColumnCount()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/ |
D | RecyclerViewUtil.java | 87 Object layoutManager = in setLayoutManager() local 89 if (layoutManager != null) { in setLayoutManager() 90 setProperty(recyclerView, layoutMgrClassName, layoutManager, "setLayoutManager"); in setLayoutManager()
|