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