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
- CoordinatorLayout
- 알림
- onMeasure
- notification
- Coroutine
- Android
- View
- recyclerview
- ViewModel
- Navigation
- kotlin
- lifecycle
- Behavior
- Algorithm
- CollapsingToolbarLayout
- 안드로이드
- onLayout
- BOJ
- CustomView
- HTTP
- 코틀린
- 백준
- LiveData
- room
- hilt
- DataBinding
- sqlite
- activity
- AppBarLayout
- 알고리즘
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