๐์ฐธ๊ณ ์๋ฃ
PagingSource
: data source์ ์ด source์์ ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ํ๋ ๋ฐฉ๋ฒ ์ ์ (๋จ์ผ ๋ฐ์ดํฐ ์์ค)RemoteMediator
: ๊ณ์ธตํ๋ ๋ฐ์ดํฐ ์์ค ํ์ด์ง ์ฒ๋ฆฌPager
: PagingSource
์ค๋ธ์ ํธ์ PageingConfig
์ค๋ธ์ ํธ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก PagingData
์ ์ธ์คํด์ค๋ฅผ constructํ๋ public API ์ ๊ณตPagingConfig
: PageSource
๋ก๋ถํฐ content๋ฅผ load ํ ๋ Pager
์ behavior ์ ์ PagingConfig(
pageSize: Int,
prefetchDistance: @IntRange(from = 0) Int,
enablePlaceholders: Boolean,
initialLoadSize: @IntRange(from = 1) Int,
maxSize: @IntRange(from = 2) Int,
jumpThreshold: Int
)
PagingData
: PagingSource
์ค๋ธ์ ํธ๋ฅผ queryํ์ฌ ๊ฒฐ๊ณผ ์ ์ฅPagingDataAdapter
: paged data๋ฅผ handlingํ๋ RecyclerView AdaptercollectAsLazyPagingItems
์ฌ์ฉ@Composable
fun <T : Any> Flow<PagingData<T>>.collectAsLazyPagingItems(
context: CoroutineContext = EmptyCoroutineContext
): LazyPagingItems<T>