Home
last modified time | relevance | path

Searched refs:layoutManager (Results 1 – 25 of 50) sorted by relevance

12

/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DPagerSnapHelper.java48 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, in calculateDistanceToFinalSnap() argument
51 if (layoutManager.canScrollHorizontally()) { in calculateDistanceToFinalSnap()
52 out[0] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap()
53 getHorizontalHelper(layoutManager)); in calculateDistanceToFinalSnap()
58 if (layoutManager.canScrollVertically()) { in calculateDistanceToFinalSnap()
59 out[1] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap()
60 getVerticalHelper(layoutManager)); in calculateDistanceToFinalSnap()
69 public View findSnapView(RecyclerView.LayoutManager layoutManager) { in findSnapView() argument
70 if (layoutManager.canScrollVertically()) { in findSnapView()
71 return findCenterView(layoutManager, getVerticalHelper(layoutManager)); in findSnapView()
[all …]
DLinearSnapHelper.java44 @NonNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) { in calculateDistanceToFinalSnap()
46 if (layoutManager.canScrollHorizontally()) { in calculateDistanceToFinalSnap()
47 out[0] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap()
48 getHorizontalHelper(layoutManager)); in calculateDistanceToFinalSnap()
53 if (layoutManager.canScrollVertically()) { in calculateDistanceToFinalSnap()
54 out[1] = distanceToCenter(layoutManager, targetView, in calculateDistanceToFinalSnap()
55 getVerticalHelper(layoutManager)); in calculateDistanceToFinalSnap()
63 public int findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, in findTargetSnapPosition() argument
65 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) { in findTargetSnapPosition()
69 final int itemCount = layoutManager.getItemCount(); in findTargetSnapPosition()
[all …]
DSnapHelper.java67 LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in onFling() local
68 if (layoutManager == null) { in onFling()
77 && snapFromFling(layoutManager, velocityX, velocityY); in onFling()
157 private boolean snapFromFling(@NonNull LayoutManager layoutManager, int velocityX, in snapFromFling() argument
159 if (!(layoutManager instanceof ScrollVectorProvider)) { in snapFromFling()
163 SmoothScroller smoothScroller = createScroller(layoutManager); in snapFromFling()
168 int targetPosition = findTargetSnapPosition(layoutManager, velocityX, velocityY); in snapFromFling()
174 layoutManager.startSmoothScroll(smoothScroller); in snapFromFling()
187 LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in snapToTargetExistingView() local
188 if (layoutManager == null) { in snapToTargetExistingView()
[all …]
DLinearSmoothScroller.java302 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 …]
DOrientationHelper.java46 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { in OrientationHelper() argument
47 mLayoutManager = layoutManager; in OrientationHelper()
232 RecyclerView.LayoutManager layoutManager, @RecyclerView.Orientation int orientation) { in createOrientationHelper() argument
235 return createHorizontalHelper(layoutManager); in createOrientationHelper()
237 return createVerticalHelper(layoutManager); in createOrientationHelper()
249 RecyclerView.LayoutManager layoutManager) { in createHorizontalHelper() argument
250 return new OrientationHelper(layoutManager) { in createHorizontalHelper()
347 public static OrientationHelper createVerticalHelper(RecyclerView.LayoutManager layoutManager) {
348 return new OrientationHelper(layoutManager) {
/frameworks/base/core/java/com/android/internal/widget/
DLinearSmoothScroller.java302 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 …]
DOrientationHelper.java47 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/tests/src/android/support/v7/widget/test/
DRecyclerViewTest.java84 RecyclerView.LayoutManager layoutManager = view.getLayoutManager(); in inflation() local
85 assertNotNull("LayoutManager not created.", layoutManager); in inflation()
87 layoutManager.getClass().getName(), GridLayoutManager.class.getName()); in inflation()
88 GridLayoutManager gridLayoutManager = ((GridLayoutManager) layoutManager); in inflation()
95 layoutManager = view.getLayoutManager(); in inflation()
96 assertNotNull("LayoutManager not created.", layoutManager); in inflation()
98 layoutManager.getClass().getName(), in inflation()
101 (CustomLayoutManager) layoutManager; in inflation()
107 layoutManager = view.getLayoutManager(); in inflation()
108 assertNotNull("LayoutManager not created.", layoutManager); in inflation()
[all …]
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DLinearLayoutManagerSavedStateTest.java99 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 …]
DRecyclerViewOnGenericMotionEventTest.java60 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in rotaryEncoderVerticalScroll() local
61 mRecyclerView.setLayoutManager(layoutManager); in rotaryEncoderVerticalScroll()
73 MockLayoutManager layoutManager = new MockLayoutManager(true, false); in rotaryEncoderHorizontalScroll() local
74 mRecyclerView.setLayoutManager(layoutManager); in rotaryEncoderHorizontalScroll()
84 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in pointerVerticalScroll() local
85 mRecyclerView.setLayoutManager(layoutManager); in pointerVerticalScroll()
95 MockLayoutManager layoutManager = new MockLayoutManager(true, true); in pointerHorizontalScroll() local
96 mRecyclerView.setLayoutManager(layoutManager); in pointerHorizontalScroll()
DRecyclerViewAccessibilityLifecycleTest.java173 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 …]
DStaggeredGridLayoutManagerSavedStateTest.java76 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
DGridLayoutManagerNoOpUpdateTest.java112 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()
DRecyclerViewBasicTest.java91 MockLayoutManager layoutManager = new MockLayoutManager(); in layoutWithoutAdapter() local
92 mRecyclerView.setLayoutManager(layoutManager); in layoutWithoutAdapter()
95 0, layoutManager.mLayoutCount); in layoutWithoutAdapter()
171 MockLayoutManager layoutManager = new MockLayoutManager(); in layoutSimple() local
172 mRecyclerView.setLayoutManager(layoutManager); in layoutSimple()
176 + " layout manager's layout method", 1, layoutManager.mLayoutCount); in layoutSimple()
198 MockLayoutManager layoutManager = new MockLayoutManager(); in adapterChangeCallbacks() local
199 mRecyclerView.setLayoutManager(layoutManager); in adapterChangeCallbacks()
202 layoutManager.assertPrevNextAdapters(null, adapterOld); in adapterChangeCallbacks()
206 layoutManager.assertPrevNextAdapters("switching adapters should trigger correct callbacks" in adapterChangeCallbacks()
[all …]
DBaseWrapContentTest.java71 RecyclerView.LayoutManager layoutManager = createLayoutManager(); in unspecifiedWithHintTest() local
81 rv.setLayoutManager(layoutManager); in unspecifiedWithHintTest()
148 RecyclerView.LayoutManager layoutManager = scenario.createLayoutManager(); in runScenario() local
151 recyclerView.setLayoutManager(layoutManager); in runScenario()
153 mLayoutManager = layoutManager; in runScenario()
224 abstract protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager); in getVerticalGravity() argument
226 abstract protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager); in getHorizontalGravity() argument
451 RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager(); in getChildBounds() local
453 Rect rect = new Rect(layoutManager.getDecoratedLeft(child) - lp.leftMargin, in getChildBounds()
454 layoutManager.getDecoratedTop(child) - lp.topMargin, in getChildBounds()
[all …]
DRecyclerViewAnimationsTest.java234 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithoutPredictive()
240 super.beforePostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithoutPredictive()
245 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithoutPredictive()
247 super.afterPostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithoutPredictive()
288 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithPredictive()
291 super.beforePostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithPredictive()
296 AnimationLayoutManager layoutManager, in dontLayoutReusedViewWithPredictive()
298 super.afterPostLayout(recycler, layoutManager, state); in dontLayoutReusedViewWithPredictive()
412 AnimationLayoutManager layoutManager, in reuseHiddenViewWithProperPredictive()
415 super.afterPreLayout(recycler, layoutManager, state); in reuseHiddenViewWithProperPredictive()
[all …]
DLinearLayoutManagerWrapContentTest.java158 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()
DRecyclerViewAccessibilityTest.java250 final DumbLayoutManager layoutManager = new DumbLayoutManager(); in ignoreAccessibilityIfAdapterHasChanged() local
253 recyclerView.setLayoutManager(layoutManager); in ignoreAccessibilityIfAdapterHasChanged()
254 layoutManager.expectLayouts(1); in ignoreAccessibilityIfAdapterHasChanged()
256 layoutManager.waitForLayout(1); in ignoreAccessibilityIfAdapterHasChanged()
DStaggeredGridLayoutManagerWrapContentTest.java150 protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager) { in getVerticalGravity() argument
155 protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager) { in getHorizontalGravity() argument
DRecyclerViewFocusRecoveryTest.java94 void setupBasic(TestLayoutManager layoutManager) throws Throwable { in setupBasic() argument
95 setupBasic(null, layoutManager); in setupBasic()
102 void setupBasic(@Nullable TestAdapter adapter, @Nullable TestLayoutManager layoutManager) in setupBasic() argument
105 if (layoutManager == null) { in setupBasic()
106 layoutManager = new FocusLayoutManager(); in setupBasic()
112 mLayoutManager = layoutManager; in setupBasic()
DGridLayoutManagerSnappingTest.java182 @Nullable View findCenterView(RecyclerView.LayoutManager layoutManager) { in findCenterView() argument
183 if (layoutManager.canScrollHorizontally()) { in findCenterView()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/
DRvCompatListActivity.java34 RecyclerView.LayoutManager layoutManager; field in RvCompatListActivity.RecyclerViewFragment
43 recyclerView.setLayoutManager(layoutManager); in onCreateView()
56 fragment.layoutManager = createLayoutManager(this); in onCreate()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
DRecyclerViewUtil.java81 Object layoutManager = createLayoutManager(context, callback); in setLayoutManager() local
82 if (layoutManager != null) { in setLayoutManager()
83 setProperty(recyclerView, CN_LAYOUT_MANAGER, layoutManager, "setLayoutManager"); in setLayoutManager()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/
DPrintPreviewController.java363 LayoutManager layoutManager = mRecyclerView.getLayoutManager(); in computeShownPages() local
365 View firstChild = layoutManager.getChildAt(0); in computeShownPages()
368 View lastChild = layoutManager.getChildAt(layoutManager.getChildCount() - 1); in computeShownPages()
/frameworks/support/room/integration-tests/testapp/src/main/java/android/arch/persistence/room/integration/testapp/
DRoomPagedListActivity.java95 LinearLayoutManager layoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager(); in onSaveInstanceState() local
96 final int targetPosition = layoutManager.findFirstVisibleItemPosition(); in onSaveInstanceState()

12