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