/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
D | BaseGridView.java | 180 final GridLayoutManager mLayoutManager; field in BaseGridView 199 mLayoutManager = new GridLayoutManager(this); in BaseGridView() 200 setLayoutManager(mLayoutManager); in BaseGridView() 213 mLayoutManager.onChildRecycled(holder); in BaseGridView() 225 mLayoutManager.setFocusOutAllowed(throughFront, throughEnd); in initBaseGridViewAttributes() 228 mLayoutManager.setFocusOutSideAllowed(throughSideStart, throughSideEnd); in initBaseGridViewAttributes() 229 mLayoutManager.setVerticalMargin( in initBaseGridViewAttributes() 231 mLayoutManager.setHorizontalMargin( in initBaseGridViewAttributes() 252 mLayoutManager.setFocusScrollStrategy(scrollStrategy); in setFocusScrollStrategy() 265 return mLayoutManager.getFocusScrollStrategy(); in getFocusScrollStrategy() [all …]
|
D | VerticalGridView.java | 52 mLayoutManager.setOrientation(RecyclerView.VERTICAL); in VerticalGridView() 76 mLayoutManager.setNumRows(numColumns); in setNumColumns() 88 mLayoutManager.setRowHeight(width); in setColumnWidth()
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
D | StaggeredGridLayoutManagerTest.java | 74 mLayoutManager.onDetachedFromWindow(mRecyclerView, mRecyclerView.mRecycler); in forceLayoutOnDetach() 84 mLayoutManager.expectLayouts(1); in areAllStartsTheSame() 86 mLayoutManager.waitForLayout(2); in areAllStartsTheSame() 88 assertFalse("all starts should not be the same", mLayoutManager.areAllStartsEqual()); in areAllStartsTheSame() 96 mLayoutManager.expectLayouts(1); in areAllEndsTheSame() 98 mLayoutManager.waitForLayout(2); in areAllEndsTheSame() 100 assertFalse("all ends should not be the same", mLayoutManager.areAllEndsEqual()); in areAllEndsTheSame() 106 int[] positions = mLayoutManager.findFirstCompletelyVisibleItemPositions(null); in getPositionsBeforeInitialization() 130 mLayoutManager.findFirstCompletelyVisibleItemPositions(into); in findLastInUnevenDistribution() 133 mLayoutManager.findLastCompletelyVisibleItemPositions(into); in findLastInUnevenDistribution() [all …]
|
D | LinearLayoutManagerSnappingTest.java | 69 mLayoutManager.expectIdleState(1); in snapOnScrollSameViewEdge() 71 mLayoutManager.waitForSnap(10); in snapOnScrollSameViewEdge() 74 View view = findCenterView(mLayoutManager); in snapOnScrollSameViewEdge() 79 mLayoutManager.expectIdleState(1); in snapOnScrollSameViewEdge() 81 mLayoutManager.waitForSnap(10); in snapOnScrollSameViewEdge() 82 mLayoutManager.expectCallbacks(5); in snapOnScrollSameViewEdge() 83 mLayoutManager.assertNoCallbacks("There should be no callbacks after some time", 3); in snapOnScrollSameViewEdge() 94 View view = findCenterView(mLayoutManager); in snapOnScrollSameView() 99 mLayoutManager.expectIdleState(2); in snapOnScrollSameView() 101 mLayoutManager.waitForSnap(10); in snapOnScrollSameView() [all …]
|
D | StaggeredGridLayoutManagerSnappingTest.java | 87 View view = findCenterView(mLayoutManager); in snapOnScrollSameViewFixedSize() 91 int scrollDistance = mLayoutManager.canScrollHorizontally() ? 52 : 52; in snapOnScrollSameViewFixedSize() 93 mLayoutManager.expectIdleState(2); in snapOnScrollSameViewFixedSize() 95 mLayoutManager.waitForSnap(10); in snapOnScrollSameViewFixedSize() 98 View viewAfterScroll = findCenterView(mLayoutManager); in snapOnScrollSameViewFixedSize() 112 View view = findCenterView(mLayoutManager); in snapOnScrollSameView() 118 mLayoutManager.expectIdleState(2); in snapOnScrollSameView() 120 mLayoutManager.waitForSnap(10); in snapOnScrollSameView() 123 View viewAfterScroll = findCenterView(mLayoutManager); in snapOnScrollSameView() 136 View view = findCenterView(mLayoutManager); in snapOnScrollNextItem() [all …]
|
D | StaggeredGridLayoutManagerBaseConfigSetTest.java | 114 mLayoutManager.expectLayouts(1); in rtlTest() 115 mLayoutManager.setFakeRtl(true); in rtlTest() 116 mLayoutManager.waitForLayout(2); in rtlTest() 118 mLayoutManager.mFakeRTL = true; in rtlTest() 122 assertEquals("view should become rtl", true, mLayoutManager.isLayoutRTL()); in rtlTest() 123 OrientationHelper helper = OrientationHelper.createHorizontalHelper(mLayoutManager); in rtlTest() 124 View child0 = mLayoutManager.findViewByPosition(0); in rtlTest() 125 View child1 = mLayoutManager.findViewByPosition(mConfig.mOrientation == VERTICAL ? 1 in rtlTest() 129 logPrefix += " child1 pos:" + mLayoutManager.getPosition(child1); in rtlTest() 169 final int scrollStep = (mLayoutManager.mPrimaryOrientation.getTotalSpace() / 10) in scrollBackAndPreservePositionsTest() [all …]
|
D | WrapContentBasicTest.java | 42 private WrapContentLayoutManager mLayoutManager; field in WrapContentBasicTest 54 mLayoutManager = spy(new WrapContentLayoutManager()); in setup() 56 mRecyclerView.setLayoutManager(mLayoutManager); in setup() 63 mLayoutManager.setAutoMeasureEnabled(true); in testLayoutInOnMeasureWithoutPredictive() 64 when(mLayoutManager.supportsPredictiveItemAnimations()).thenReturn(false); in testLayoutInOnMeasureWithoutPredictive() 68 verify(mLayoutManager, times(3)) in testLayoutInOnMeasureWithoutPredictive() 74 mLayoutManager.setAutoMeasureEnabled(true); in dataChangeAfterMeasure() 79 verify(mLayoutManager, times(3)) in dataChangeAfterMeasure() 85 mLayoutManager.setAutoMeasureEnabled(true); in setDimensionsFromChildren() 87 mLayoutManager.setMeasuredDimensionFromChildren(WRAP, WRAP); in setDimensionsFromChildren() [all …]
|
D | LinearLayoutManagerBaseConfigSetTest.java | 74 .createOrientationHelper(mLayoutManager, config.mOrientation); in scrollToPositionWithOffsetTest() 77 Map<Item, Rect> before = mLayoutManager.collectChildCoordinates(); in scrollToPositionWithOffsetTest() 80 mLayoutManager.mOrientationHelper.getEnd() - 500); in scrollToPositionWithOffsetTest() 85 before, mLayoutManager.collectChildCoordinates()); in scrollToPositionWithOffsetTest() 90 final View child = mLayoutManager.getChildAt(mLayoutManager.getChildCount() / 2); in scrollToPositionWithOffsetTest() 99 mLayoutManager.expectLayouts(1); in scrollToPositionWithOffsetTest() 101 mLayoutManager.waitForLayout(2); in scrollToPositionWithOffsetTest() 120 mLayoutManager.expectLayouts(1); in scrollToPositionWithOffsetTest() 122 * orientationHelper.getDecoratedMeasurement(mLayoutManager.getChildAt(0)) / 3; in scrollToPositionWithOffsetTest() 124 mLayoutManager.waitForLayout(2); in scrollToPositionWithOffsetTest() [all …]
|
D | RecyclerViewAnimationsTest.java | 73 mLayoutManager.expectLayouts(2); in keepFocusAfterChangeAnimation() 75 mLayoutManager.waitForLayout(2); in keepFocusAfterChangeAnimation() 119 mLayoutManager.expectLayouts(2); in changeAndDisappearTest() 125 mLayoutManager.mOnLayoutCallbacks = new OnLayoutCallbacks() { in changeAndDisappearTest() 146 mLayoutManager.waitForLayout(2); in changeAndDisappearTest() 192 mLayoutManager.expectLayouts(2); in detectStableIdError() 195 mLayoutManager.waitForLayout(2); in detectStableIdError() 215 mLayoutManager.mOnLayoutCallbacks = new OnLayoutCallbacks() { in dontLayoutReusedViewWithoutPredictive() 242 mLayoutManager.expectLayouts(1); in dontLayoutReusedViewWithoutPredictive() 243 mLayoutManager.requestSimpleAnimationsInNextLayout(); in dontLayoutReusedViewWithoutPredictive() [all …]
|
D | LinearLayoutManagerResizeTest.java | 67 int lastVisibleItemPosition = mLayoutManager.findLastVisibleItemPosition(); in resize() 68 int firstVisibleItemPosition = mLayoutManager.findFirstVisibleItemPosition(); in resize() 69 int lastCompletelyVisibleItemPosition = mLayoutManager in resize() 71 int firstCompletelyVisibleItemPosition = mLayoutManager in resize() 73 mLayoutManager.expectLayouts(1); in resize() 85 mLayoutManager.waitForLayout(1); in resize() 88 lastVisibleItemPosition, mLayoutManager.findLastVisibleItemPosition()); in resize() 91 mLayoutManager.findLastCompletelyVisibleItemPosition()); in resize() 94 firstVisibleItemPosition, mLayoutManager.findFirstVisibleItemPosition()); in resize() 97 mLayoutManager.findFirstCompletelyVisibleItemPosition()); in resize()
|
D | ItemAnimatorV2ApiTest.java | 63 mLayoutManager.expectLayouts(2); in changeMovedOutside() 64 mLayoutManager.mOnLayoutCallbacks.mLayoutItemCount = 9; in changeMovedOutside() 66 mLayoutManager.waitForLayout(2); in changeMovedOutside() 107 mLayoutManager.expectLayouts(2); in changeMovedOutsideWithPredictiveAndTwoViewHolders() 108 mLayoutManager.mOnLayoutCallbacks = new OnLayoutCallbacks() { in changeMovedOutsideWithPredictiveAndTwoViewHolders() 114 mLayoutManager.addDisappearingView(recycler.getViewForPosition(0)); in changeMovedOutsideWithPredictiveAndTwoViewHolders() 115 mLayoutManager.addDisappearingView(recycler.getScrapList().get(0).itemView); in changeMovedOutsideWithPredictiveAndTwoViewHolders() 119 mLayoutManager.mOnLayoutCallbacks.mLayoutItemCount = 8; in changeMovedOutsideWithPredictiveAndTwoViewHolders() 120 mLayoutManager.mOnLayoutCallbacks.mLayoutMin = 2; in changeMovedOutsideWithPredictiveAndTwoViewHolders() 122 mLayoutManager.waitForLayout(2); in changeMovedOutsideWithPredictiveAndTwoViewHolders() [all …]
|
D | LinearLayoutManagerTest.java | 151 final int childCount = mLayoutManager.getChildCount(); in removeAnchorItemTest() 155 View child = mLayoutManager.getChildAt(i); in removeAnchorItemTest() 169 mLayoutManager.expectLayouts(2); in removeAnchorItemTest() 171 mLayoutManager.waitForLayout(1); in removeAnchorItemTest() 180 for (int i = 0; i < mLayoutManager.getChildCount(); i++) { in removeAnchorItemTest() 181 View child = mLayoutManager.getChildAt(i); in removeAnchorItemTest() 202 int center = (mLayoutManager.findLastVisibleItemPosition() in keepFocusOnRelayout() 203 - mLayoutManager.findFirstVisibleItemPosition()) / 2; in keepFocusOnRelayout() 205 final int top = mLayoutManager.mOrientationHelper.getDecoratedStart(vh.itemView); in keepFocusOnRelayout() 209 mLayoutManager.expectLayouts(2); in keepFocusOnRelayout() [all …]
|
D | LinearLayoutManagerPrepareForDropTest.java | 108 final int base = mLayoutManager.getWidth() / 5; in prepareForDropTest() 112 final int base = mLayoutManager.getHeight() / 5; in prepareForDropTest() 119 mLayoutManager.expectLayouts(1); in prepareForDropTest() 121 mLayoutManager.waitForLayout(1); in prepareForDropTest() 123 final View fromChild = mLayoutManager.getChildAt(positions[0]); in prepareForDropTest() 124 final int fromPos = mLayoutManager.getPosition(fromChild); in prepareForDropTest() 125 final View onChild = mLayoutManager.getChildAt(positions[1]); in prepareForDropTest() 126 final int toPos = mLayoutManager.getPosition(onChild); in prepareForDropTest() 127 final OrientationHelper helper = mLayoutManager.mOrientationHelper; in prepareForDropTest() 139 mLayoutManager.expectLayouts(2); in prepareForDropTest() [all …]
|
D | StaggeredGridLayoutManagerSavedStateTest.java | 166 final int firstCompletelyVisiblePosition = mLayoutManager.findFirstVisibleItemPositionInt(); in savedState() 167 Map<Item, Rect> before = mLayoutManager.collectChildCoordinates(); in savedState() 189 mLayoutManager = new WrappedLayoutManager(mConfig.mSpanCount, mConfig.mOrientation); in savedState() 190 mLayoutManager.setGapStrategy(mConfig.mGapStrategy); in savedState() 191 restored.setLayoutManager(mLayoutManager); in savedState() 202 mLayoutManager.expectLayouts(1); in savedState() 204 mLayoutManager.waitForLayout(2); in savedState() 206 mConfig.mReverseLayout, mLayoutManager.getReverseLayout()); in savedState() 208 mConfig.mOrientation, mLayoutManager.getOrientation()); in savedState() 210 mConfig.mSpanCount, mLayoutManager.getSpanCount()); in savedState() [all …]
|
D | AsyncListUtilLayoutTest.java | 52 WrappedLinearLayoutManager mLayoutManager; field in AsyncListUtilLayoutTest 69 mLayoutManager = new WrappedLinearLayoutManager( in asyncListUtil() 71 mRecyclerView.setLayoutManager(mLayoutManager); in asyncListUtil() 73 mLayoutManager.expectLayouts(1); in asyncListUtil() 75 mLayoutManager.waitForLayout(2); in asyncListUtil() 78 assertEquals(rangeStart, mLayoutManager.findFirstVisibleItemPosition()); in asyncListUtil() 80 final int rangeSize = mLayoutManager.findLastVisibleItemPosition() + 1; in asyncListUtil() 145 mLayoutManager.expectLayouts(1); in scrollAndAssert() 147 mLayoutManager.waitForLayout(1); in scrollAndAssert() 155 mLayoutManager.scrollToPositionWithOffset(position, offset); in scrollToPositionWithOffset() [all …]
|
D | RecyclerViewFocusRecoveryTest.java | 50 TestLayoutManager mLayoutManager; field in RecyclerViewFocusRecoveryTest 100 mLayoutManager = layoutManager; in setupBasic() 103 recyclerView.setLayoutManager(mLayoutManager); in setupBasic() 105 mLayoutManager.expectLayouts(1); in setupBasic() 107 mLayoutManager.waitForLayout(1); in setupBasic() 114 mLayoutManager.setSupportsPredictive(true); in testFocusRecoveryInChange() 117 mLayoutManager.expectLayouts(2); in testFocusRecoveryInChange() 119 mLayoutManager.waitForLayout(2); in testFocusRecoveryInChange() 129 mLayoutManager.expectLayouts(1); in testFocusRecoveryInChange() 157 mLayoutManager.setSupportsPredictive(withAnimation); in testFocusRecoveryInTypeChange() [all …]
|
D | LinearLayoutManagerSavedStateTest.java | 56 return mLayoutManager; in LinearLayoutManagerSavedStateTest() 68 return mLayoutManager; in LinearLayoutManagerSavedStateTest() 282 Map<Item, Rect> before = mLayoutManager.collectChildCoordinates(); in savedStateTest() 306 mLayoutManager = new WrappedLinearLayoutManager(getActivity(), in savedStateTest() 308 mLayoutManager.setStackFromEnd(mConfig.mStackFromEnd); in savedStateTest() 309 restored.setLayoutManager(mLayoutManager); in savedStateTest() 322 mLayoutManager.expectLayouts(1); in savedStateTest() 324 mLayoutManager.waitForLayout(2); in savedStateTest() 329 mConfig.mReverseLayout, mLayoutManager.getReverseLayout()); in savedStateTest() 331 mConfig.mOrientation, mLayoutManager.getOrientation()); in savedStateTest() [all …]
|
D | BaseLinearLayoutManagerTest.java | 69 WrappedLinearLayoutManager mLayoutManager; field in BaseLinearLayoutManagerTest 101 mLayoutManager = new WrappedLinearLayoutManager(getActivity(), config.mOrientation, in setupByConfig() 103 mLayoutManager.setStackFromEnd(config.mStackFromEnd); in setupByConfig() 104 mLayoutManager.setRecycleChildrenOnDetach(config.mRecycleChildrenOnDetach); in setupByConfig() 105 mRecyclerView.setLayoutManager(mLayoutManager); in setupByConfig() 127 mLayoutManager.mOnLayoutListener = new OnLayoutListener() { in scrollToPositionWithPredictive() 132 scrollPosition, mLayoutManager.mPendingScrollPosition); in scrollToPositionWithPredictive() 135 scrollOffset, mLayoutManager.mPendingScrollPositionOffset); in scrollToPositionWithPredictive() 143 mLayoutManager.getPaddingTop() + scrollOffset + in scrollToPositionWithPredictive() 146 mLayoutManager.getDecoratedTop(vh.itemView)); in scrollToPositionWithPredictive() [all …]
|
D | StaggeredGridLayoutManagerGapTest.java | 81 mLayoutManager.expectLayouts(1); in gapAtTheBeginningOfTheListTest() 83 mLayoutManager.waitForLayout(2); in gapAtTheBeginningOfTheListTest() 95 final Map<Item, Rect> actualCoords = mLayoutManager.collectChildCoordinates(); in gapAtTheBeginningOfTheListTest() 102 final Map<Item, Rect> desiredCoords = mLayoutManager.collectChildCoordinates(); in gapAtTheBeginningOfTheListTest()
|
D | LinearLayoutManagerCacheTest.java | 87 mLayoutManager.expectPrefetch(1); in cacheAndPrefetch() 98 mLayoutManager.waitForPrefetch(1); in cacheAndPrefetch() 111 int lastVisibleItemPosition = mLayoutManager.findLastVisibleItemPosition(); in cacheAndPrefetch() 112 int firstVisibleItemPosition = mLayoutManager.findFirstVisibleItemPosition(); in cacheAndPrefetch()
|
D | StaggeredGridLayoutManagerCacheTest.java | 79 mLayoutManager.findFirstVisibleItemPositions(positions); in findFirstVisibleItemPosition() 86 mLayoutManager.findLastVisibleItemPositions(positions); in findLastVisibleItemPosition() 111 mLayoutManager.expectPrefetch(1); in cacheAndPrefetch() 122 mLayoutManager.waitForPrefetch(1); in cacheAndPrefetch()
|
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/ |
D | OrientationHelper.java | 37 protected final RecyclerView.LayoutManager mLayoutManager; field in OrientationHelper 48 mLayoutManager = layoutManager; in OrientationHelper() 254 return mLayoutManager.getWidth() - mLayoutManager.getPaddingRight(); in createHorizontalHelper() 259 return mLayoutManager.getWidth(); in createHorizontalHelper() 264 mLayoutManager.offsetChildrenHorizontal(amount); in createHorizontalHelper() 269 return mLayoutManager.getPaddingLeft(); in createHorizontalHelper() 276 return mLayoutManager.getDecoratedMeasuredWidth(view) + params.leftMargin in createHorizontalHelper() 284 return mLayoutManager.getDecoratedMeasuredHeight(view) + params.topMargin in createHorizontalHelper() 292 return mLayoutManager.getDecoratedRight(view) + params.rightMargin; in createHorizontalHelper() 299 return mLayoutManager.getDecoratedLeft(view) - params.leftMargin; in createHorizontalHelper() [all …]
|
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/widget/ |
D | LinearLayoutManagerActivity.java | 40 mDividerItemDecoration = new DividerItemDecoration(this, mLayoutManager.getOrientation()); in onRecyclerViewInit() 50 return mLayoutManager.getOrientation() == LinearLayoutManager.HORIZONTAL; in createConfigToggles() 55 mLayoutManager.setOrientation(newValue ? LinearLayoutManager.HORIZONTAL in createConfigToggles() 58 mDividerItemDecoration.setOrientation(mLayoutManager.getOrientation()); in createConfigToggles() 66 return mLayoutManager.getReverseLayout(); in createConfigToggles() 71 mLayoutManager.setReverseLayout(newValue); in createConfigToggles() 90 return mLayoutManager.getStackFromEnd(); in createConfigToggles() 95 mLayoutManager.setStackFromEnd(newValue); in createConfigToggles()
|
D | GridLayoutManagerActivity.java | 47 return 1 + (Math.abs(item.hashCode()) % mLayoutManager.getSpanCount()); 57 return mLayoutManager.getOrientation() == LinearLayoutManager.HORIZONTAL; in createConfigToggles() 62 mLayoutManager.setOrientation(newValue ? LinearLayoutManager.HORIZONTAL in createConfigToggles() 69 return mLayoutManager.getReverseLayout(); in createConfigToggles() 74 mLayoutManager.setReverseLayout(newValue); in createConfigToggles() 93 return mLayoutManager.getStackFromEnd(); in createConfigToggles() 98 mLayoutManager.setStackFromEnd(newValue); in createConfigToggles() 109 mLayoutManager.scrollToPositionWithOffset(position, offset);
|
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/helper/ |
D | ItemTouchHelperTest.java | 47 TestLayoutManager mLayoutManager; field in ItemTouchHelperTest 64 mLayoutManager = new TestLayoutManager() { in setup() 84 mWrappedRecyclerView.setLayoutManager(mLayoutManager); in setup() 142 mLayoutManager.expectLayouts(1); in basicSwipeTest() 144 mLayoutManager.waitForLayout(1); in basicSwipeTest() 156 mLayoutManager.expectLayouts(1); in basicSwipeTest() 158 mLayoutManager.waitForLayout(1); in basicSwipeTest()
|