Home
last modified time | relevance | path

Searched refs:RecyclerView (Results 1 – 25 of 55) sorted by relevance

123

/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DRecyclerViewLayoutTest.java43 import static android.support.v7.widget.RecyclerView.SCROLL_STATE_IDLE;
44 import static android.support.v7.widget.RecyclerView.SCROLL_STATE_DRAGGING;
45 import static android.support.v7.widget.RecyclerView.SCROLL_STATE_SETTLING;
58 RecyclerView recyclerView = new RecyclerView(getActivity()); in testScrollToPositionCallback()
60 int scrollPos = RecyclerView.NO_POSITION; in testScrollToPositionCallback()
62 public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { in testScrollToPositionCallback()
64 if (scrollPos == RecyclerView.NO_POSITION) { in testScrollToPositionCallback()
88 recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() { in testScrollToPositionCallback()
90 public void onScrolled(RecyclerView recyclerView, int dx, int dy) { in testScrollToPositionCallback()
163 RecyclerView recyclerView = new RecyclerView(getActivity()); in scrollInBothDirection()
[all …]
DRecyclerViewAnimationsTest.java55 RecyclerView setupBasic(int itemCount) throws Throwable { in setupBasic()
59 RecyclerView setupBasic(int itemCount, int firstLayoutStartIndex, int firstLayoutItemCount) in setupBasic()
64 RecyclerView setupBasic(int itemCount, int firstLayoutStartIndex, int firstLayoutItemCount, in setupBasic()
95 final RecyclerView rv = mRecyclerView; in testDetachBeforeAnimations()
118 void beforePreLayout(RecyclerView.Recycler recycler, in testPreLayoutPositionCleanup()
119 AnimationLayoutManager lm, RecyclerView.State state) { in testPreLayoutPositionCleanup()
125 void beforePostLayout(RecyclerView.Recycler recycler, in testPreLayoutPositionCleanup()
127 RecyclerView.State state) { in testPreLayoutPositionCleanup()
140 final List<RecyclerView.ViewHolder> mRecycledViews in testAddRemoveSamePass()
141 = new ArrayList<RecyclerView.ViewHolder>(); in testAddRemoveSamePass()
[all …]
DRecyclerViewBasicTest.java31 RecyclerView mRecyclerView;
36 mRecyclerView = new RecyclerView(mContext); in setUp()
163 RecyclerView restored = new RecyclerView(mContext); in testSavedStateWithStatelessLayoutManager()
167 savedState = RecyclerView.SavedState.CREATOR.createFromParcel(parcel); in testSavedStateWithStatelessLayoutManager()
191 savedState = RecyclerView.SavedState.CREATOR.createFromParcel(parcel); in testSavedState()
193 RecyclerView restored = new RecyclerView(mContext); in testSavedState()
209 static class MockLayoutManager extends RecyclerView.LayoutManager {
215 RecyclerView.Adapter mPrevAdapter;
217 RecyclerView.Adapter mNextAdapter;
222 public void onAdapterChanged(RecyclerView.Adapter oldAdapter, in onAdapterChanged()
[all …]
DBaseRecyclerViewInstrumentationTest.java44 protected RecyclerView mRecyclerView;
78 void setAdapter(final RecyclerView.Adapter adapter) throws Throwable { in setAdapter()
87 void swapAdapter(final RecyclerView.Adapter adapter, in swapAdapter()
161 final RecyclerView.Adapter adapter = mRecyclerView.getAdapter(); in removeRecyclerView()
178 .isRunning(new RecyclerView.ItemAnimator.ItemAnimatorFinishedListener() { in waitForAnimations()
189 public void setRecyclerView(final RecyclerView recyclerView) throws Throwable { in setRecyclerView()
192 public void setRecyclerView(final RecyclerView recyclerView, boolean assignDummyPool) in setRecyclerView()
196 public void setRecyclerView(final RecyclerView recyclerView, boolean assignDummyPool, in setRecyclerView()
201 RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() { in setRecyclerView()
203 public RecyclerView.ViewHolder getRecycledView(int viewType) { in setRecyclerView()
[all …]
DDefaultItemAnimatorTest.java45 List<RecyclerView.ViewHolder> mExpectedItems = new ArrayList<RecyclerView.ViewHolder>();
47 Set<RecyclerView.ViewHolder> mRemoveFinished = new HashSet<RecyclerView.ViewHolder>();
48 Set<RecyclerView.ViewHolder> mAddFinished = new HashSet<RecyclerView.ViewHolder>();
49 Set<RecyclerView.ViewHolder> mMoveFinished = new HashSet<RecyclerView.ViewHolder>();
50 Set<RecyclerView.ViewHolder> mChangeFinished = new HashSet<RecyclerView.ViewHolder>();
64 mAnimator.setListener(new RecyclerView.ItemAnimator.ItemAnimatorListener() { in setUp()
66 public void onRemoveFinished(RecyclerView.ViewHolder item) { in setUp()
76 public void onAddFinished(RecyclerView.ViewHolder item) { in setUp()
86 public void onMoveFinished(RecyclerView.ViewHolder item) { in setUp()
96 public void onChangeFinished(RecyclerView.ViewHolder item) { in setUp()
[all …]
DGridLayoutManagerTest.java64 public RecyclerView setupBasic(Config config) throws Throwable { in setupBasic()
68 public RecyclerView setupBasic(Config config, GridTestAdapter testAdapter) throws Throwable { in setupBasic()
69 RecyclerView recyclerView = new RecyclerView(getActivity()); in setupBasic()
79 public void waitForFirstLayout(RecyclerView recyclerView) throws Throwable { in waitForFirstLayout()
116 final RecyclerView rv = setupBasic(config, testAdapter); in customSizeInScrollDirectionTest()
145 final RecyclerView recyclerView = setupBasic(new Config(3, orientation, false)); in accessibilitySpanIndicesTest()
190 final RecyclerView rv = setupBasic(new Config(3, 100).orientation(orientation), in layoutParamsTest()
272 RecyclerView.State state = new RecyclerView.State(); in testAnchorUpdate()
384 final RecyclerView recyclerView = setupBasic(new Config(3, 100)); in testNotifyDataSetChange()
391 public void onBeforeLayout(RecyclerView.Recycler recycler, RecyclerView.State state) { in testNotifyDataSetChange()
[all …]
DRecyclerViewAccessibilityTest.java45 final RecyclerView recyclerView = new RecyclerView(getActivity()) { in onInitializeAccessibilityNodeInfoTest()
67 public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { in onInitializeAccessibilityNodeInfoTest()
72 public RecyclerView.LayoutParams generateDefaultLayoutParams() { in onInitializeAccessibilityNodeInfoTest()
73 return new RecyclerView.LayoutParams(-1, -1); in onInitializeAccessibilityNodeInfoTest()
82 public int scrollHorizontallyBy(int dx, RecyclerView.Recycler recycler, in onInitializeAccessibilityNodeInfoTest()
83 RecyclerView.State state) { in onInitializeAccessibilityNodeInfoTest()
93 public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, in onInitializeAccessibilityNodeInfoTest()
94 RecyclerView.State state) { in onInitializeAccessibilityNodeInfoTest()
204 final RecyclerView recyclerView, final int action) throws Throwable { in performAccessibilityAction()
DLinearLayoutManagerTest.java93 mRecyclerView = new RecyclerView(getActivity()); in setupByConfig()
112 final RecyclerView.ViewHolder vh = mRecyclerView.findViewHolderForLayoutPosition(center); in testKeepFocusOnRelayout()
128 … final RecyclerView.ViewHolder postVH = mRecyclerView.findViewHolderForLayoutPosition(center); in testKeepFocusOnRelayout()
322 void after(RecyclerView.Recycler recycler, RecyclerView.State state) { in scrollToPositionWithPredictive()
331 RecyclerView.ViewHolder vh = in scrollToPositionWithPredictive()
337 ((RecyclerView.LayoutParams) vh.itemView in scrollToPositionWithPredictive()
390 final RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool() { in testRecycleDuringAnimations()
392 public void putRecycledView(RecyclerView.ViewHolder scrap) { in testRecycleDuringAnimations()
401 public RecyclerView.ViewHolder getRecycledView(int viewType) { in testRecycleDuringAnimations()
402 final RecyclerView.ViewHolder recycledView = super.getRecycledView(viewType); in testRecycleDuringAnimations()
[all …]
DStaggeredGridLayoutManagerTest.java81 mRecyclerView = new RecyclerView(getActivity()); in setupByConfig()
89 mRecyclerView.addItemDecoration(new RecyclerView.ItemDecoration() { in setupByConfig()
91 public void getItemOffsets(Rect outRect, View view, RecyclerView parent, in setupByConfig()
92 RecyclerView.State state) { in setupByConfig()
391 void after(RecyclerView.Recycler recycler, RecyclerView.State state) { in scrollToPositionWithPredictive()
392 RecyclerView rv = mLayoutManager.mRecyclerView; in scrollToPositionWithPredictive()
401 RecyclerView.ViewHolder vh = rv.findViewHolderForLayoutPosition(scrollPosition); in scrollToPositionWithPredictive()
406 + ((RecyclerView.LayoutParams) vh.itemView in scrollToPositionWithPredictive()
489 mRecyclerView.getScrollState() != RecyclerView.SCROLL_STATE_IDLE) { in getFirstLastChildrenTest()
693 final RecyclerView.Adapter adapter = mAdapter; in gapAtTheBeginningOfTheListTest()
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DOrientationHelper.java36 protected final RecyclerView.LayoutManager mLayoutManager;
44 private OrientationHelper(RecyclerView.LayoutManager layoutManager) { in OrientationHelper()
176 RecyclerView.LayoutManager layoutManager, int orientation) { in createOrientationHelper()
193 RecyclerView.LayoutManager layoutManager) { in createHorizontalHelper()
217 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in createHorizontalHelper()
225 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in createHorizontalHelper()
233 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in createHorizontalHelper()
240 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in createHorizontalHelper()
269 public static OrientationHelper createVerticalHelper(RecyclerView.LayoutManager layoutManager) {
293 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams)
[all …]
DGridLayoutManager.java100 public int getRowCountForAccessibility(RecyclerView.Recycler recycler, in getRowCountForAccessibility()
101 RecyclerView.State state) { in getRowCountForAccessibility()
112 public int getColumnCountForAccessibility(RecyclerView.Recycler recycler, in getColumnCountForAccessibility()
113 RecyclerView.State state) { in getColumnCountForAccessibility()
124 public void onInitializeAccessibilityNodeInfoForItem(RecyclerView.Recycler recycler, in onInitializeAccessibilityNodeInfoForItem()
125 RecyclerView.State state, View host, AccessibilityNodeInfoCompat info) { in onInitializeAccessibilityNodeInfoForItem()
147 public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { in onLayoutChildren()
174 public void onItemsAdded(RecyclerView recyclerView, int positionStart, int itemCount) { in onItemsAdded()
179 public void onItemsChanged(RecyclerView recyclerView) { in onItemsChanged()
184 public void onItemsRemoved(RecyclerView recyclerView, int positionStart, int itemCount) { in onItemsRemoved()
[all …]
DLinearLayoutManager.java31 import static android.support.v7.widget.RecyclerView.NO_POSITION;
39 public class LinearLayoutManager extends RecyclerView.LayoutManager {
160 public RecyclerView.LayoutParams generateDefaultLayoutParams() { in generateDefaultLayoutParams()
161 return new RecyclerView.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, in generateDefaultLayoutParams()
194 public void onDetachedFromWindow(RecyclerView view, RecyclerView.Recycler recycler) { in onDetachedFromWindow()
391 protected int getExtraLayoutSpace(RecyclerView.State state) { in getExtraLayoutSpace()
400 public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, in smoothScrollToPosition()
431 public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
581 void onAnchorReady(RecyclerView.State state, AnchorInfo anchorInfo) { in onAnchorReady()
587 private void layoutForPredictiveAnimations(RecyclerView.Recycler recycler, in layoutForPredictiveAnimations()
[all …]
DRecyclerViewAccessibilityDelegate.java31 final RecyclerView mRecyclerView;
34 public RecyclerViewAccessibilityDelegate(RecyclerView recyclerView) { in RecyclerViewAccessibilityDelegate()
53 info.setClassName(RecyclerView.class.getName()); in onInitializeAccessibilityNodeInfo()
62 event.setClassName(RecyclerView.class.getName()); in onInitializeAccessibilityEvent()
63 if (host instanceof RecyclerView) { in onInitializeAccessibilityEvent()
64 RecyclerView rv = (RecyclerView) host; in onInitializeAccessibilityEvent()
DLinearSmoothScroller.java33 abstract public class LinearSmoothScroller extends RecyclerView.SmoothScroller {
106 protected void onTargetFound(View targetView, RecyclerView.State state, Action action) { in onTargetFound()
120 protected void onSeekTargetStep(int dx, int dy, RecyclerView.State state, Action action) { in onSeekTargetStep()
299 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDyToMakeVisible()
303 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in calculateDyToMakeVisible()
324 final RecyclerView.LayoutManager layoutManager = getLayoutManager(); in calculateDxToMakeVisible()
328 final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) in calculateDxToMakeVisible()
DScrollbarHelper.java29 static int computeScrollOffset(RecyclerView.State state, OrientationHelper orientation, in computeScrollOffset()
30 View startChild, View endChild, RecyclerView.LayoutManager lm, in computeScrollOffset()
60 static int computeScrollExtent(RecyclerView.State state, OrientationHelper orientation, in computeScrollExtent()
61 View startChild, View endChild, RecyclerView.LayoutManager lm, in computeScrollExtent()
79 static int computeScrollRange(RecyclerView.State state, OrientationHelper orientation, in computeScrollRange()
80 View startChild, View endChild, RecyclerView.LayoutManager lm, in computeScrollRange()
DStaggeredGridLayoutManager.java43 import static android.support.v7.widget.RecyclerView.NO_POSITION;
53 public class StaggeredGridLayoutManager extends RecyclerView.LayoutManager {
263 if (state == RecyclerView.SCROLL_STATE_IDLE) { in onScrollStateChanged()
269 public void onDetachedFromWindow(RecyclerView view, RecyclerView.Recycler recycler) { in onDetachedFromWindow()
532 public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
654 void updateAnchorInfoForLayout(RecyclerView.State state, AnchorInfo anchorInfo) {
668 private boolean updateAnchorFromChildren(RecyclerView.State state, AnchorInfo anchorInfo) {
680 boolean updateAnchorFromPendingData(RecyclerView.State state, AnchorInfo anchorInfo) {
907 public int computeHorizontalScrollOffset(RecyclerView.State state) {
911 private int computeScrollOffset(RecyclerView.State state) {
[all …]
DLayoutState.java72 boolean hasMore(RecyclerView.State state) { in hasMore()
82 View next(RecyclerView.Recycler recycler) { in next()
DRecyclerView.java127 public class RecyclerView extends ViewGroup { class
318 public RecyclerView(Context context) { in RecyclerView() method in RecyclerView
322 public RecyclerView(Context context, AttributeSet attrs) { in RecyclerView() method in RecyclerView
326 public RecyclerView(Context context, AttributeSet attrs, int defStyle) { in RecyclerView() method in RecyclerView
374 return RecyclerView.this.getChildCount(); in initChildrenHelper()
379 RecyclerView.this.addView(child, index); in initChildrenHelper()
385 return RecyclerView.this.indexOfChild(view); in initChildrenHelper()
390 final View child = RecyclerView.this.getChildAt(index); in initChildrenHelper()
394 RecyclerView.this.removeViewAt(index); in initChildrenHelper()
399 return RecyclerView.this.getChildAt(offset); in initChildrenHelper()
[all …]
/frameworks/base/docs/html/training/material/
Dlists-cards.jd9 <li><a href="#RecyclerView">Create Lists</a></li>
23 {@link android.support.v7.widget.RecyclerView} and {@link android.support.v7.widget.CardView}
27 <h2 id="RecyclerView">Create Lists</h2>
29 <p>The {@link android.support.v7.widget.RecyclerView} widget is a more advanced and flexible
32 {@link android.support.v7.widget.RecyclerView} widget when you have data collections whose elements
35 <p>The {@link android.support.v7.widget.RecyclerView} class simplifies the display and handling of
44 android.support.v7.widget.RecyclerView} widgets.</p>
46 <img src="{@docRoot}training/material/images/RecyclerView.png" alt="" width="550" height="106"/>
48 <strong>Figure 1</strong>. The <code>RecyclerView</code> widget.
51 <p>To use the {@link android.support.v7.widget.RecyclerView} widget, you have to specify an
[all …]
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/
DPrintPreviewController.java28 import android.support.v7.widget.RecyclerView;
29 import android.support.v7.widget.RecyclerView.ViewHolder;
30 import android.support.v7.widget.RecyclerView.LayoutManager;
56 private final RecyclerView mRecyclerView;
77 mRecyclerView = (RecyclerView) activity.findViewById(R.id.preview_content); in PrintPreviewController()
316 private final class PreloadController extends RecyclerView.OnScrollListener {
317 private final RecyclerView mRecyclerView;
321 public PreloadController(RecyclerView recyclerView) { in PreloadController()
327 public void onScrollStateChanged(RecyclerView recyclerView, int state) { in onScrollStateChanged()
329 case RecyclerView.SCROLL_STATE_SETTLING: { in onScrollStateChanged()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DItemBridgeAdapter.java16 import android.support.v7.widget.RecyclerView;
27 public class ItemBridgeAdapter extends RecyclerView.Adapter {
84 public class ViewHolder extends RecyclerView.ViewHolder {
237 public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { in onCreateViewHolder()
270 public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { in onBindViewHolder()
283 public void onViewRecycled(RecyclerView.ViewHolder holder) { in onViewRecycled()
295 public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) { in onViewAttachedToWindow()
304 public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder) { in onViewDetachedFromWindow()
DGridLayoutManager.java24 import android.support.v7.widget.RecyclerView;
25 import android.support.v7.widget.RecyclerView.Recycler;
26 import android.support.v7.widget.RecyclerView.State;
28 import static android.support.v7.widget.RecyclerView.NO_ID;
29 import static android.support.v7.widget.RecyclerView.NO_POSITION;
30 import static android.support.v7.widget.RecyclerView.HORIZONTAL;
31 import static android.support.v7.widget.RecyclerView.VERTICAL;
48 final class GridLayoutManager extends RecyclerView.LayoutManager {
56 static class LayoutParams extends RecyclerView.LayoutParams {
87 public LayoutParams(RecyclerView.LayoutParams source) { in LayoutParams()
[all …]
DVerticalGridView.java19 import android.support.v7.widget.RecyclerView;
39 mLayoutManager.setOrientation(RecyclerView.VERTICAL); in VerticalGridView()
DDetailsOverviewRowPresenter.java24 import android.support.v7.widget.RecyclerView;
180 final RecyclerView.OnScrollListener mScrollListener =
181 new RecyclerView.OnScrollListener() {
184 public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
187 public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
197 RecyclerView.ViewHolder viewHolder; in checkFirstAndLastPosition()
/frameworks/support/v7/recyclerview/
DREADME.txt1 Library Project including RecyclerView and associated utilities.

123