Searched refs:layoutManager (Results 1 - 25 of 47) sorted by relevance

12

/frameworks/support/car/src/main/java/androidx/car/widget/
H A DPagedSnapHelper.java68 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, argument
72 out[0] = layoutManager.canScrollHorizontally()
73 ? getHorizontalHelper(layoutManager).getDecoratedStart(targetView)
76 out[1] = layoutManager.canScrollVertically()
77 ? getVerticalHelper(layoutManager).getDecoratedStart(targetView)
89 * @param layoutManager The current {@link RecyclerView.LayoutManager} for the attached
100 public View findSnapView(RecyclerView.LayoutManager layoutManager) { argument
101 int childCount = layoutManager.getChildCount();
106 OrientationHelper orientationHelper = getOrientationHelper(layoutManager);
110 View firstChild = layoutManager
240 createScroller(RecyclerView.LayoutManager layoutManager) argument
290 isAtStart(RecyclerView.LayoutManager layoutManager) argument
306 isAtEnd(RecyclerView.LayoutManager layoutManager) argument
325 getOrientationHelper( @onNull RecyclerView.LayoutManager layoutManager) argument
333 getVerticalHelper(@onNull RecyclerView.LayoutManager layoutManager) argument
341 getHorizontalHelper( @onNull RecyclerView.LayoutManager layoutManager) argument
[all...]
H A DPagedListView.java258 RecyclerView.LayoutManager layoutManager =
260 mRecyclerView.setLayoutManager(layoutManager);
524 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
525 if (layoutManager == null) {
529 RecyclerView.SmoothScroller smoothScroller = mSnapHelper.createScroller(layoutManager);
532 layoutManager.startSmoothScroll(smoothScroller);
547 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
549 if (layoutManager == null) {
554 if ((layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) {
555 PointF vector = ((RecyclerView.SmoothScroller.ScrollVectorProvider) layoutManager)
809 getOrientationHelper(RecyclerView.LayoutManager layoutManager) argument
[all...]
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/
H A DLinearSnapHelper.java45 @NonNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) {
47 if (layoutManager.canScrollHorizontally()) {
48 out[0] = distanceToCenter(layoutManager, targetView,
49 getHorizontalHelper(layoutManager));
54 if (layoutManager.canScrollVertically()) {
55 out[1] = distanceToCenter(layoutManager, targetView,
56 getVerticalHelper(layoutManager));
64 public int findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, argument
66 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) {
70 final int itemCount = layoutManager
44 calculateDistanceToFinalSnap( @onNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) argument
132 findSnapView(RecyclerView.LayoutManager layoutManager) argument
141 distanceToCenter(@onNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView, OrientationHelper helper) argument
165 estimateNextPositionDiffForFling(RecyclerView.LayoutManager layoutManager, OrientationHelper helper, int velocityX, int velocityY) argument
187 findCenterView(RecyclerView.LayoutManager layoutManager, OrientationHelper helper) argument
231 computeDistancePerChild(RecyclerView.LayoutManager layoutManager, OrientationHelper helper) argument
272 getVerticalHelper(@onNull RecyclerView.LayoutManager layoutManager) argument
280 getHorizontalHelper( @onNull RecyclerView.LayoutManager layoutManager) argument
[all...]
H A DPagerSnapHelper.java50 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, argument
53 if (layoutManager.canScrollHorizontally()) {
54 out[0] = distanceToCenter(layoutManager, targetView,
55 getHorizontalHelper(layoutManager));
60 if (layoutManager.canScrollVertically()) {
61 out[1] = distanceToCenter(layoutManager, targetView,
62 getVerticalHelper(layoutManager));
71 public View findSnapView(RecyclerView.LayoutManager layoutManager) { argument
72 if (layoutManager.canScrollVertically()) {
73 return findCenterView(layoutManager, getVerticalHelpe
81 findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY) argument
124 createSnapScroller(RecyclerView.LayoutManager layoutManager) argument
153 distanceToCenter(@onNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView, OrientationHelper helper) argument
176 findCenterView(RecyclerView.LayoutManager layoutManager, OrientationHelper helper) argument
217 findStartView(RecyclerView.LayoutManager layoutManager, OrientationHelper helper) argument
241 getVerticalHelper(@onNull RecyclerView.LayoutManager layoutManager) argument
249 getHorizontalHelper( @onNull RecyclerView.LayoutManager layoutManager) argument
[all...]
H A DSnapHelper.java65 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
66 if (layoutManager == null) {
75 && snapFromFling(layoutManager, velocityX, velocityY);
148 * @param layoutManager The {@link RecyclerView.LayoutManager} associated with the attached
155 private boolean snapFromFling(@NonNull RecyclerView.LayoutManager layoutManager, int velocityX, argument
157 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) {
161 RecyclerView.SmoothScroller smoothScroller = createScroller(layoutManager);
166 int targetPosition = findTargetSnapPosition(layoutManager, velocityX, velocityY);
172 layoutManager.startSmoothScroll(smoothScroller);
185 RecyclerView.LayoutManager layoutManager
208 createScroller(RecyclerView.LayoutManager layoutManager) argument
223 createSnapScroller(RecyclerView.LayoutManager layoutManager) argument
267 calculateDistanceToFinalSnap(@onNull RecyclerView.LayoutManager layoutManager, @NonNull View targetView) argument
287 findSnapView(RecyclerView.LayoutManager layoutManager) argument
300 findTargetSnapPosition(RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY) argument
[all...]
H A DLinearSmoothScroller.java303 final RecyclerView.LayoutManager layoutManager = getLayoutManager();
304 if (layoutManager == null || !layoutManager.canScrollVertically()) {
309 final int top = layoutManager.getDecoratedTop(view) - params.topMargin;
310 final int bottom = layoutManager.getDecoratedBottom(view) + params.bottomMargin;
311 final int start = layoutManager.getPaddingTop();
312 final int end = layoutManager.getHeight() - layoutManager.getPaddingBottom();
328 final RecyclerView.LayoutManager layoutManager = getLayoutManager();
329 if (layoutManager
[all...]
H A DOrientationHelper.java46 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { argument
47 mLayoutManager = layoutManager;
235 * @param layoutManager LayoutManager to attach to
240 RecyclerView.LayoutManager layoutManager, @RecyclerView.Orientation int orientation) {
243 return createHorizontalHelper(layoutManager);
245 return createVerticalHelper(layoutManager);
253 * @param layoutManager The LayoutManager to attach to.
257 RecyclerView.LayoutManager layoutManager) {
258 return new OrientationHelper(layoutManager) {
352 * @param layoutManager Th
239 createOrientationHelper( RecyclerView.LayoutManager layoutManager, @RecyclerView.Orientation int orientation) argument
256 createHorizontalHelper( RecyclerView.LayoutManager layoutManager) argument
355 createVerticalHelper(RecyclerView.LayoutManager layoutManager) argument
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DLinearSmoothScroller.java302 final RecyclerView.LayoutManager layoutManager = getLayoutManager();
303 if (layoutManager == null || !layoutManager.canScrollVertically()) {
308 final int top = layoutManager.getDecoratedTop(view) - params.topMargin;
309 final int bottom = layoutManager.getDecoratedBottom(view) + params.bottomMargin;
310 final int start = layoutManager.getPaddingTop();
311 final int end = layoutManager.getHeight() - layoutManager.getPaddingBottom();
327 final RecyclerView.LayoutManager layoutManager = getLayoutManager();
328 if (layoutManager
[all...]
H A DOrientationHelper.java47 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { argument
48 mLayoutManager = layoutManager;
228 * @param layoutManager LayoutManager to attach to
233 RecyclerView.LayoutManager layoutManager, int orientation) {
236 return createHorizontalHelper(layoutManager);
238 return createVerticalHelper(layoutManager);
246 * @param layoutManager The LayoutManager to attach to.
250 RecyclerView.LayoutManager layoutManager) {
251 return new OrientationHelper(layoutManager) {
345 * @param layoutManager Th
232 createOrientationHelper( RecyclerView.LayoutManager layoutManager, int orientation) argument
249 createHorizontalHelper( RecyclerView.LayoutManager layoutManager) argument
348 createVerticalHelper(RecyclerView.LayoutManager layoutManager) argument
[all...]
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/test/
H A DRecyclerViewTest.java83 RecyclerView.LayoutManager layoutManager = view.getLayoutManager();
84 assertNotNull("LayoutManager not created.", layoutManager);
86 layoutManager.getClass().getName(), GridLayoutManager.class.getName());
87 GridLayoutManager gridLayoutManager = ((GridLayoutManager) layoutManager);
94 layoutManager = view.getLayoutManager();
95 assertNotNull("LayoutManager not created.", layoutManager);
97 layoutManager.getClass().getName(),
100 (CustomLayoutManager) layoutManager;
106 layoutManager = view.getLayoutManager();
107 assertNotNull("LayoutManager not created.", layoutManager);
[all...]
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/
H A DLinearLayoutManagerSavedStateTest.java99 layoutManager().expectLayouts(1);
101 layoutManager().waitForLayout(2);
112 layoutManager().expectLayouts(1);
115 layoutManager().waitForLayout(2);
126 layoutManager().expectLayouts(1);
129 layoutManager().waitForLayout(2);
151 layoutManager().setOrientation(config.mOrientation);
168 layoutManager().setStackFromEnd(config.mStackFromEnd);
185 layoutManager().setReverseLayout(config.mReverseLayout);
202 layoutManager()
355 protected WrappedLinearLayoutManager layoutManager() { method in class:LinearLayoutManagerSavedStateTest.PostLayoutRunnable
390 protected WrappedLinearLayoutManager layoutManager() { method in class:LinearLayoutManagerSavedStateTest.PostRestoreRunnable
[all...]
H A DRecyclerViewSmoothScrollerTest.java41 RecyclerView.LayoutManager layoutManager = mock(RecyclerView.LayoutManager.class);
42 recyclerView.setLayoutManager(layoutManager);
45 mockSmoothScroller.start(recyclerView, layoutManager);
H A DRecyclerViewOnGenericMotionEventTest.java61 MockLayoutManager layoutManager = new MockLayoutManager(true, true);
62 mRecyclerView.setLayoutManager(layoutManager);
73 MockLayoutManager layoutManager = new MockLayoutManager(true, false);
74 mRecyclerView.setLayoutManager(layoutManager);
83 MockLayoutManager layoutManager = new MockLayoutManager(true, true);
84 mRecyclerView.setLayoutManager(layoutManager);
93 MockLayoutManager layoutManager = new MockLayoutManager(true, true);
94 mRecyclerView.setLayoutManager(layoutManager);
H A DGridLayoutManagerNoOpUpdateTest.java112 RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
114 Rect rect = new Rect(layoutManager.getDecoratedLeft(child) - lp.leftMargin,
115 layoutManager.getDecoratedTop(child) - lp.topMargin,
116 layoutManager.getDecoratedRight(child) + lp.rightMargin,
117 layoutManager.getDecoratedBottom(child) + lp.bottomMargin);
H A DStaggeredGridLayoutManagerSavedStateTest.java76 layoutManager().expectLayouts(1);
78 layoutManager().waitForLayout(2);
89 layoutManager().expectLayouts(1);
92 layoutManager().waitForLayout(2);
103 layoutManager().expectLayouts(1);
106 layoutManager().waitForLayout(2);
236 public WrappedLayoutManager layoutManager() { method in class:StaggeredGridLayoutManagerSavedStateTest.PostLayoutRunnable
H A DRecyclerViewAccessibilityLifecycleTest.java173 final TestLayoutManager layoutManager = new TestLayoutManager() {
201 layoutManager.expectLayouts(1);
204 recyclerView.setLayoutManager(layoutManager);
212 layoutManager.waitForLayout(1);
237 layoutManager.expectLayouts(1);
239 layoutManager.waitForLayout(1);
269 final TestLayoutManager layoutManager = new TestLayoutManager() {
281 layoutManager.expectLayouts(1);
284 recyclerView.setLayoutManager(layoutManager);
292 layoutManager
[all...]
H A DBaseWrapContentTest.java72 RecyclerView.LayoutManager layoutManager = createLayoutManager();
82 rv.setLayoutManager(layoutManager);
151 RecyclerView.LayoutManager layoutManager = scenario.createLayoutManager();
154 recyclerView.setLayoutManager(layoutManager);
156 mLayoutManager = layoutManager;
227 abstract protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager); argument
229 abstract protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager); argument
454 RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
456 Rect rect = new Rect(layoutManager.getDecoratedLeft(child) - lp.leftMargin,
457 layoutManager
[all...]
H A DLinearLayoutManagerWrapContentTest.java158 protected int getVerticalGravity(RecyclerView.LayoutManager layoutManager) { argument
169 protected int getHorizontalGravity(RecyclerView.LayoutManager layoutManager) { argument
170 boolean rtl = layoutManager.getLayoutDirection() == ViewCompat.LAYOUT_DIRECTION_RTL;
H A DRecyclerViewAccessibilityTest.java251 final DumbLayoutManager layoutManager = new DumbLayoutManager();
254 recyclerView.setLayoutManager(layoutManager);
255 layoutManager.expectLayouts(1);
257 layoutManager.waitForLayout(1);
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/
H A DRvCompatListActivity.java34 RecyclerView.LayoutManager layoutManager; field in class:RvCompatListActivity.RecyclerViewFragment
43 recyclerView.setLayoutManager(layoutManager);
56 fragment.layoutManager = createLayoutManager(this);
/frameworks/support/car/src/androidTest/java/androidx/car/widget/
H A DDividerVisibilityManagerTest.java103 RecyclerView.LayoutManager layoutManager =
114 for (int i = 0; i < layoutManager.getChildCount(); i++) {
115 views[i] = layoutManager.getChildAt(i);
131 for (int i = 0; i < layoutManager.getChildCount(); i++) {
132 views[i] = layoutManager.getChildAt(i);
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/
H A DRecyclerViewUtil.java87 Object layoutManager =
89 if (layoutManager != null) {
90 setProperty(recyclerView, layoutMgrClassName, layoutManager, "setLayoutManager");
/frameworks/support/recyclerview-selection/src/main/java/androidx/recyclerview/selection/
H A DDefaultBandHost.java122 RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
123 if (layoutManager instanceof GridLayoutManager) {
124 return ((GridLayoutManager) layoutManager).getSpanCount();
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/car/
H A DFullscreenUserSwitcher.java51 GridLayoutManager layoutManager = new GridLayoutManager(context,
53 mUserGridView.getRecyclerView().setLayoutManager(layoutManager);
/frameworks/support/room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/
H A DRoomPagedListActivity.java83 LinearLayoutManager layoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager();
84 final int targetPosition = layoutManager.findFirstVisibleItemPosition();

Completed in 2080 milliseconds

12