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