Home
last modified time | relevance | path

Searched refs:pagedList (Results 1 – 11 of 11) sorted by relevance

/frameworks/support/paging/common/src/test/java/androidx/paging/
DTiledPagedListTest.kt74 val pagedList = createTiledPagedList(loadPosition = 0, initPageCount = 1) in getDataSource() constant
75 assertTrue(pagedList.dataSource is ListDataSource<Item>) in getDataSource()
78 assertSame(pagedList.dataSource, in getDataSource()
79 (pagedList.snapshot() as SnapshotPagedList<Item>).dataSource) in getDataSource()
84 val pagedList = createTiledPagedList(loadPosition = 0, initPageCount = 1) in initialLoad_onePage() constant
85 verifyLoadedPages(pagedList, 0, 1) in initialLoad_onePage()
90 val pagedList = createTiledPagedList(loadPosition = 10, initPageCount = 1) in initialLoad_onePageOffset() constant
91 verifyLoadedPages(pagedList, 0, 1) in initialLoad_onePageOffset()
96 val pagedList = createTiledPagedList(loadPosition = 0, initPageCount = 100) in initialLoad_full() constant
97 verifyLoadedPages(pagedList, 0, 1, 2, 3, 4) in initialLoad_full()
[all …]
DContiguousPagedListTest.kt169 val pagedList = createCountedPagedList(0) in construct() constant
170 verifyRange(0, 40, pagedList) in construct()
175 val pagedList = createCountedPagedList(0) in getDataSource() constant
176 assertTrue(pagedList.dataSource is TestSource) in getDataSource()
179 assertSame(pagedList.dataSource, in getDataSource()
180 (pagedList.snapshot() as SnapshotPagedList<Item>).dataSource) in getDataSource()
194 val pagedList = createCountedPagedList(0) in append() constant
196 pagedList.addWeakCallback(null, callback) in append()
197 verifyRange(0, 40, pagedList) in append()
200 pagedList.loadAround(35) in append()
[all …]
DPositionalDataSourceTest.kt96 val pagedList = ContiguousPagedList(dataSource.wrapAsContiguousWithoutPlaceholders(), in fullLoadWrappedAsContiguous() constant
100 assertEquals((10..19).toList(), pagedList) in fullLoadWrappedAsContiguous()
103 pagedList.loadAround(5) in fullLoadWrappedAsContiguous()
105 assertEquals((0..29).toList(), pagedList) in fullLoadWrappedAsContiguous()
109 pagedList.loadAround(i * 10 - 5) in fullLoadWrappedAsContiguous()
111 assertEquals((0..i * 10 + 9).toList(), pagedList) in fullLoadWrappedAsContiguous()
DPageKeyedDataSourceTest.kt64 val pagedList = ContiguousPagedList<String, Item>(ItemDataSource(), in loadFullVerify() constant
70 assertEquals(PAGE_MAP[INIT_KEY]!!.data, pagedList) in loadFullVerify()
74 pagedList.loadAround(0) in loadFullVerify()
75 pagedList.loadAround(pagedList.size - 1) in loadFullVerify()
80 assertEquals(ITEM_LIST, pagedList) in loadFullVerify()
/frameworks/support/paging/common/src/main/java/androidx/paging/
DSnapshotPagedList.java27 SnapshotPagedList(@NonNull PagedList<T> pagedList) { in SnapshotPagedList() argument
28 super(pagedList.mStorage.snapshot(), in SnapshotPagedList()
29 pagedList.mMainThreadExecutor, in SnapshotPagedList()
30 pagedList.mBackgroundThreadExecutor, in SnapshotPagedList()
32 pagedList.mConfig); in SnapshotPagedList()
33 mDataSource = pagedList.getDataSource(); in SnapshotPagedList()
34 mContiguous = pagedList.isContiguous(); in SnapshotPagedList()
35 mLastKey = pagedList.getLastKey(); in SnapshotPagedList()
/frameworks/support/paging/runtime/src/main/java/androidx/paging/
DAsyncPagedListDiffer.java231 public void submitList(final PagedList<T> pagedList) { in submitList() argument
232 if (pagedList != null) { in submitList()
234 mIsContiguous = pagedList.isContiguous(); in submitList()
236 if (pagedList.isContiguous() != mIsContiguous) { in submitList()
243 if (pagedList == mPagedList) { in submitList()
251 if (pagedList == null) { in submitList()
269 mPagedList = pagedList; in submitList()
270 pagedList.addWeakCallback(null, mPagedListCallback); in submitList()
273 mUpdateCallback.onInserted(0, pagedList.size()); in submitList()
276 mListener.onCurrentListChanged(pagedList); in submitList()
[all …]
DPagedListAdapter.java150 public void submitList(PagedList<T> pagedList) { in submitList() argument
151 mDiffer.submitList(pagedList); in submitList()
/frameworks/support/room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/
DPagedListCustomerAdapter.java82 public void submitList(PagedList<Customer> pagedList) { in submitList() argument
83 super.submitList(pagedList); in submitList()
85 if (pagedList != null) { in submitList()
94 localScrollToPosition = findKeyInPagedList(mScrollToKey, pagedList); in submitList()
99 localScrollToPosition = mScrollToPosition - pagedList.getPositionOffset(); in submitList()
/frameworks/support/paging/runtime/src/androidTest/java/androidx/paging/
DLivePagedListBuilderTest.kt114 val pagedList = pagedListHolder[0] in <lambda>() constant
115 assertNotNull(pagedList) in <lambda>()
116 assertEquals(listOf("a", "b", null, null), pagedList) in <lambda>()
119 pagedList!!.loadAround(2) in <lambda>()
122 assertEquals(listOf("a", "b", "c", "d"), pagedList) in <lambda>()
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/
DQueryTransactionTest.java197 public void pagedList() { in pagedList() method in QueryTransactionTest
198 LiveData<PagedList<Entity1>> pagedList = in pagedList() local
199 new LivePagedListBuilder<>(mDao.pagedList(), 10).build(); in pagedList()
200 observeForever(pagedList); in pagedList()
207 assertThat(pagedList.getValue().size(), is(1)); in pagedList()
208 assertTransactionCount(pagedList.getValue(), mUseTransactionDao ? 2 : 1); in pagedList()
212 assertThat(pagedList.getValue().size(), is(2)); in pagedList()
213 assertTransactionCount(pagedList.getValue(), mUseTransactionDao ? 4 : 2); in pagedList()
358 DataSource.Factory<Integer, Entity1> pagedList(); in pagedList() method
398 DataSource.Factory<Integer, Entity1> pagedList(); in pagedList() method
[all …]
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/paging/
DDataSourceFactoryTest.java146 final PagedList<User> pagedList = observer.get(); in validateUsersAsPagedList() local
147 assertThat(getAndLoad(pagedList, 50), notNullValue()); in validateUsersAsPagedList()
148 assertThat(getAndLoad(pagedList, 70), nullValue()); in validateUsersAsPagedList()
235 public void onChanged(@Nullable PagedList<T> pagedList) { in onChanged() argument
236 mList = pagedList; in onChanged()