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 |
Tags
- recyclerview
- 알림
- hilt
- CollapsingToolbarLayout
- 알고리즘
- Algorithm
- notification
- Behavior
- ViewModel
- HTTP
- 안드로이드
- onMeasure
- activity
- lifecycle
- LiveData
- 백준
- onLayout
- BOJ
- Coroutine
- Android
- 코틀린
- room
- CoordinatorLayout
- View
- kotlin
- sqlite
- Navigation
- AppBarLayout
- DataBinding
- CustomView
Archives
- Today
- Total
목록PagingConfig (1)
개발일지
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cpk4mR/btq5DDGPrgp/Om0KEGamWXz9LYkTYDHGR0/img.png)
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