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

SnapHelper RecyclerView를 ViewPager처럼 사용하거나 NumberPicker처럼 Scroll하다가 하나의 Item을 자석처럼 끌어당겨 하나의 Item을 선택하게 도와주는 클래스이다. Kotlin val snapHelper = LinearSnapHelper() snapHelper.attachToRecyclerView(recyclerView) OnScrollListener를 사용해서 SnapHelper가 선택한 position 받기 recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { var currentPosition = RecyclerView.NO_POSITION override fun onScrol..
Android (안드로이드)/RecyclerView
2021. 1. 21. 23:13