Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- sqlite
- room
- CustomView
- CollapsingToolbarLayout
- lifecycle
- onMeasure
- onLayout
- 알고리즘
- Behavior
- notification
- Android
- AppBarLayout
- 백준
- Navigation
- BOJ
- kotlin
- HTTP
- Coroutine
- Algorithm
- ViewModel
- LiveData
- DataBinding
- 코틀린
- 알림
- View
- recyclerview
- 안드로이드
- hilt
- activity
- CoordinatorLayout
Archives
- Today
- Total
목록PagingConfig (1)
개발일지

Pager PagingConfig를 바탕으로 PagerSource로부터 PagingData를 만들어서 Flow형으로 반환한다. 코드 @HiltViewModel class ViewerViewModel @Inject constructor(): ViewModel() { fun getPagingData(webToon: WebToon, episode: Int): Flow { return Pager(PagingConfig(pageSize = 10), episode - 1) { ViewerPagingSource(webToon, episode) }.flow // 데이터를 변환해야 할 경우 // .map { // it // } .cachedIn(viewModelScope) } } override fun onCreate(..
Android (안드로이드)/Paging
2021. 5. 25. 01:45