/frameworks/support/car/src/main/java/androidx/car/widget/ |
PagedSnapHelper.java | 63 // Orientation helpers are lazily created per LayoutManager. 68 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, 72 out[0] = layoutManager.canScrollHorizontally() 73 ? getHorizontalHelper(layoutManager).getDecoratedStart(targetView) 76 out[1] = layoutManager.canScrollVertically() 77 ? getVerticalHelper(layoutManager).getDecoratedStart(targetView) 84 * Finds the view to snap to. The view to snap to is the child of the LayoutManager that is 85 * closest to the start of the RecyclerView. The "start" depends on if the LayoutManager 89 * @param layoutManager The current {@link RecyclerView.LayoutManager} for the attache [all...] |
PagedListView.java | 71 * on configuration change. The actual saving of state will be controlled by the LayoutManager 72 * of the RecyclerView; this value simply ensures the state is passed on to the LayoutManager. 258 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) [all...] |
/frameworks/support/v7/recyclerview/src/main/java/androidx/recyclerview/widget/ |
LinearSnapHelper.java | 37 // Orientation helpers are lazily created per LayoutManager. 45 @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 [all...] |
PagerSnapHelper.java | 42 // Orientation helpers are lazily created per LayoutManager. 50 public int[] calculateDistanceToFinalSnap(@NonNull RecyclerView.LayoutManager layoutManager, 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) [all...] |
SnapHelper.java | 31 * {@link RecyclerView.LayoutManager} must implement the {@link RecyclerView.SmoothScroller.ScrollVectorProvider} interface or 65 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, 157 if (!(layoutManager instanceof RecyclerView.SmoothScroller.ScrollVectorProvider)) [all...] |
LinearSmoothScroller.java | 31 * If the {@link RecyclerView.LayoutManager} you are using does not implement the 303 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() [all...] |
OrientationHelper.java | 25 * It is developed to easily support vertical and horizontal orientations in a LayoutManager but 29 * @see #createHorizontalHelper(RecyclerView.LayoutManager) 30 * @see #createVerticalHelper(RecyclerView.LayoutManager) 36 protected final RecyclerView.LayoutManager mLayoutManager; 46 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { 47 mLayoutManager = layoutManager; 51 * Returns the {@link RecyclerView.LayoutManager LayoutManager} that 54 public RecyclerView.LayoutManager getLayoutManager() [all...] |
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/ui/widget/ |
EmptyWidget.java | 22 import com.androidplot.ui.LayoutManager;
27 public EmptyWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics) {
28 super(layoutManager, sizeMetrics);
|
TextLabelWidget.java | 41 public TextLabelWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics) {
42 this(layoutManager, sizeMetrics, TextOrientationType.HORIZONTAL);
45 public TextLabelWidget(LayoutManager layoutManager, String title, SizeMetrics sizeMetrics, TextOrientationType orientation) {
46 this(layoutManager, sizeMetrics, orientation);
50 public TextLabelWidget(LayoutManager layoutManager, SizeMetrics sizeMetrics, TextOrientationType orientation) {
51 super(layoutManager, new SizeMetrics(0, SizeLayoutType.ABSOLUTE, 0, SizeLayoutType.ABSOLUTE));
|
/frameworks/base/core/java/com/android/internal/widget/ |
LinearSmoothScroller.java | 33 * If the {@link RecyclerView.LayoutManager} you are using does not implement the 302 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() [all...] |
OrientationHelper.java | 26 * It is developed to easily support vertical and horizontal orientations in a LayoutManager but 30 * @see #createHorizontalHelper(RecyclerView.LayoutManager) 31 * @see #createVerticalHelper(RecyclerView.LayoutManager) 37 protected final RecyclerView.LayoutManager mLayoutManager; 47 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { 48 mLayoutManager = layoutManager; 63 * Make sure you call {@link #onLayoutComplete()} at the end of your LayoutManager's 64 * {@link RecyclerView.LayoutManager#onLayoutChildren(RecyclerView.Recycler, 110 * @see RecyclerView.LayoutManager#getTransformedBoundingBox(View, boolean, Rect [all...] |
/developers/build/prebuilts/gradle/RecyclerView/kotlinApp/app/src/main/java/com/example/android/recyclerview/ |
RecyclerViewFragment.kt | 37 private lateinit var layoutManager: RecyclerView.LayoutManager 59 // to the way ListView would layout elements. The RecyclerView.LayoutManager defines how 61 layoutManager = LinearLayoutManager(activity) 87 * Set RecyclerView's LayoutManager to the one given. 95 if (recyclerView.layoutManager != null) { 96 scrollPosition = (recyclerView.layoutManager as LinearLayoutManager) 102 layoutManager = GridLayoutManager(activity, SPAN_COUNT) 106 layoutManager = LinearLayoutManager(activity) 112 layoutManager = this@RecyclerViewFragment.layoutManage [all...] |
/developers/samples/android/ui/views/RecyclerView/kotlinApp/app/src/main/java/com/example/android/recyclerview/ |
RecyclerViewFragment.kt | 37 private lateinit var layoutManager: RecyclerView.LayoutManager 59 // to the way ListView would layout elements. The RecyclerView.LayoutManager defines how 61 layoutManager = LinearLayoutManager(activity) 87 * Set RecyclerView's LayoutManager to the one given. 95 if (recyclerView.layoutManager != null) { 96 scrollPosition = (recyclerView.layoutManager as LinearLayoutManager) 102 layoutManager = GridLayoutManager(activity, SPAN_COUNT) 106 layoutManager = LinearLayoutManager(activity) 112 layoutManager = this@RecyclerViewFragment.layoutManage [all...] |
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/test/ |
RecyclerViewTest.java | 83 RecyclerView.LayoutManager layoutManager = view.getLayoutManager(); 84 assertNotNull("LayoutManager not created.", layoutManager); 85 assertEquals("Incorrect LayoutManager created", 86 layoutManager.getClass().getName(), GridLayoutManager.class.getName()); 87 GridLayoutManager gridLayoutManager = ((GridLayoutManager) layoutManager); 94 layoutManager = view.getLayoutManager(); 95 assertNotNull("LayoutManager not created.", layoutManager); [all...] |
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/ |
LinearLayoutManagerSavedStateTest.java | 99 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().setRecycleChildrenOnDetach(config.mRecycleChildrenOnDetach) [all...] |
RecyclerViewSmoothScrollerTest.java | 41 RecyclerView.LayoutManager layoutManager = mock(RecyclerView.LayoutManager.class); 42 recyclerView.setLayoutManager(layoutManager); 45 mockSmoothScroller.start(recyclerView, layoutManager);
|
RecyclerViewOnGenericMotionEventTest.java | 61 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); 141 static class MockLayoutManager extends RecyclerView.LayoutManager {
|
GridLayoutManagerNoOpUpdateTest.java | 112 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);
|
StaggeredGridLayoutManagerSavedStateTest.java | 76 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() {
|
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/pie/ |
PieWidget.java | 21 import com.androidplot.ui.LayoutManager; 35 public PieWidget(LayoutManager layoutManager, PieChart pieChart, SizeMetrics metrics) { 36 super(layoutManager, metrics);
|
/packages/apps/Dialer/java/com/android/dialer/contactsfragment/ |
FastScroller.java | 35 private LinearLayoutManager layoutManager; 55 void setup(ContactsAdapter adapter, LinearLayoutManager layoutManager) { 57 this.layoutManager = layoutManager; 97 layoutManager.scrollToPositionWithOffset(targetPos, 0);
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/ |
RvCompatListActivity.java | 34 RecyclerView.LayoutManager layoutManager; 43 recyclerView.setLayoutManager(layoutManager); 56 fragment.layoutManager = createLayoutManager(this); 62 protected RecyclerView.LayoutManager createLayoutManager(Context context) {
|
/packages/apps/Car/Radio/src/com/android/car/radio/ |
PresetListScrollListener.java | 62 // The default LayoutManager for PagedListView is a LinearLayoutManager. Radio does 64 LinearLayoutManager layoutManager = 67 if (layoutManager.findFirstCompletelyVisibleItemPosition() == 0) {
|
/packages/apps/Car/Settings/src/com/android/car/settings/users/ |
UserSwitcherFragment.java | 53 GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 56 mUserGridView.getRecyclerView().setLayoutManager(layoutManager);
|
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/ |
GridSpacingItemDecoration.java | 50 GridLayoutManager layoutManager = (GridLayoutManager) parent.getLayoutManager(); 52 int spanCount = layoutManager.getSpanCount();
|