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
- Android
- recyclerview
- DataBinding
- notification
- CustomView
- room
- Behavior
- LiveData
- lifecycle
- 코틀린
- ViewModel
- Algorithm
- 안드로이드
- HTTP
- activity
- 알림
- 백준
- AppBarLayout
- hilt
- CoordinatorLayout
- View
- kotlin
- Navigation
- 알고리즘
- BOJ
- CollapsingToolbarLayout
- onMeasure
- Coroutine
- sqlite
- onLayout
Archives
- Today
- Total
목록SelectionObserver (1)
개발일지

SelectionObserver Selection에 Observer을 통해 콜백 함수를 작성할 수 있다. Selection이 되면 Delete Option Menu가 생기는 예제이다. addObserver(object : SelectionTracker.SelectionObserver() { override fun onSelectionChanged() { super.onSelectionChanged() val tracker = this@apply if (tracker.hasSelection() && menu.findItem(MENU_DELETE) == null) { menu.add(Menu.NONE, MENU_DELETE, Menu.NONE, "Delete") .setIcon(R.drawable.ic_de..
Android (안드로이드)/RecyclerView
2021. 1. 15. 04:32