Lines Matching refs:adapter

142         TestAdapter adapter = new TestAdapter(50) {
149 adapter.setHasStableIds(true);
150 setupBasic(50, 3, 5, adapter);
339 final TestAdapter adapter = new TestAdapter(1000) {
347 setupBasic(1000, 10, 20, adapter);
370 adapter.addAndNotify(15, 1);
408 final TestAdapter adapter = new TestAdapter(itemCount) {
414 adapter.setHasStableIds(true);
415 initialSet.addAll(adapter.mItems);
416 positionStatesTest(itemCount, 5, 5, adapter, new AdapterOps() {
419 Item item5 = adapter.mItems.get(5);
420 Item item6 = adapter.mItems.get(6);
423 adapter.mItems.remove(5);
424 adapter.mItems.add(6, item5);
425 adapter.dispatchDataSetChanged();
444 TestAdapter adapter = new TestAdapter(10) {
457 adapter.setHasStableIds(stableIds);
458 setupBasic(10, 0, 10, adapter);
461 if (adapter.hasStableIds()) {
462 assertEquals("getItemId should be called when adapter has stable ids", 10,
465 assertEquals("getItemId should not be called when adapter does not have stable ids", 0,
473 final int deleteCount = adapter.getItemCount() - deleteStart;
474 adapter.deleteAndNotify(deleteStart, deleteCount);
479 if (adapter.hasStableIds()) {
481 + " should be called when adapter has stable ids",
488 if (adapter.hasStableIds()) {
589 assertTrue("scrolling while there are pending adapter updates should "
591 assertEquals("scroll by should be called w/ updated adapter count",
623 assertTrue("scrolling while there are pending adapter updates should "
625 assertEquals("scroll by should be called w/ updated adapter count",
764 void onRun(TestAdapter adapter) throws Throwable {
765 adapter.addDeleteAndNotify(new int[]{3, 2}, new int[]{2, -2});
782 void onRun(TestAdapter adapter) throws Throwable {
783 adapter.addDeleteAndNotify(new int[]{3, 2}, new int[]{1, -1},
788 PositionConstraint.scrap(4, 4, 4), PositionConstraint.adapter(0),
789 PositionConstraint.adapter(1), PositionConstraint.adapter(3)
796 void onRun(TestAdapter adapter) throws Throwable {
797 adapter.addAndNotify(new int[]{1, 2}, new int[]{5, 1}, new int[]{5, 1},
810 void onRun(TestAdapter adapter) throws Throwable {
811 adapter.deleteAndNotify(new int[]{0, 1}, new int[]{1, 1}, new int[]{7, 1},
829 int firstLayoutItemCount,TestAdapter adapter, AdapterOps adapterChanges,
831 setupBasic(itemCount, firstLayoutStartIndex, firstLayoutItemCount, adapter);
1080 assertEquals("on pre layout, state should return abstracted adapter size",
1086 assertEquals("on post layout, state should return real adapter size",
1223 assertEquals("adapter position calculations should match view holder "
1277 final public void run(TestAdapter adapter) throws Throwable {
1278 onRun(adapter);
1308 adapter,
1309 adapterScrap /*first pass adapter, second pass scrap*/
1336 constraint.mPostLayoutPos = position;// adapter pos does not change
1340 public static PositionConstraint adapter(int position) {
1342 constraint.mType = Type.adapter;
1345 constraint.mPostLayoutPos = position;// adapter pos does not change
1378 assertNotNull(this + ": result should come from adapter\n" + log,
1380 assertEquals(this + ": old position should be none when it came from adapter\n" + log,
1394 } else if (mType == Type.adapter || mType == Type.adapterScrap || !result.scrapResult