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