일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 알림
- onLayout
- 백준
- CustomView
- AppBarLayout
- Behavior
- sqlite
- notification
- Algorithm
- Coroutine
- 코틀린
- Android
- hilt
- 알고리즘
- recyclerview
- kotlin
- HTTP
- lifecycle
- View
- activity
- room
- LiveData
- 안드로이드
- ViewModel
- BOJ
- onMeasure
- Navigation
- CoordinatorLayout
- DataBinding
- CollapsingToolbarLayout
- Today
- Total
목록Selection (2)
개발일지
RecyclerView Selection에서 선택한 ViewHolder의 키 값을 가져오기 위해 ItemKeyProvider를 사용한다. 보통의 경우 StableIdKeyProvider를 사용할 수 있다. 하지만 StableIdKeyProvider은 내부적으로 Cache 기능을 사용하기 때문에 Selection이 등록된 후 Item을 제거하는 기능을 사용하면 내부적으로 동기화가 되지 않는다. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.taetae98.qrreader, PID: 30548 java.lang.IllegalArgumentException at androidx.core.util.Preconditions.checkArgument(Precondit..

Selection Tracker RecyclerView에서 Item을 선택하는 기능을 제공한다. ex) 갤러리에서 사진 여러개 선택 Dependency dependencies { implementation "androidx.recyclerview:recyclerview:1.1.0" // For control over item selection of both touch and mouse driven selection implementation "androidx.recyclerview:recyclerview-selection:1.1.0-rc03" } 기본구조 RecyclerView에서 Select이 발생하면 Select된 ViewHolder의 Id를 Selection에 기록하고, onBindViewHolde..