Compute the horizontal extent of the horizontal scrollbar's thumb within the horizontal range. | |
Compute the horizontal offset of the horizontal scrollbar's thumb within the horizontal range. | |
Compute the horizontal range that the horizontal scrollbar represents. | |
Compute the vertical extent of the vertical scrollbar's thumb within the vertical range. | |
Compute the vertical offset of the vertical scrollbar's thumb within the vertical range. | |
Compute the vertical range that the vertical scrollbar represents. |
* Extend : 한 화면에 보여지는 View 의 크기(width || height)
- 아래 이미지에서 주황색 영역
* Offset : Scroll된 거리 -> -1을 곱하면 해당 뷰의 위치(x || y, top || left) 가 된다.
--> staggered grid layout 일 경우 값이 튀는(?) 경우들이 발생한다.
--> 리스트가 scroll 될 때마다 child 의 위치가 변경되는 경우들이 발생하기 때문에 range 도 바뀌고 offset 들이 바뀌는 경우 들이 있기 때문이다.
* Range : Scroll 가능한 View 의 전체 크기 -> RecyclerView 의 크기( width || height )
--> staggered grid layout 일 경우 스크롤링 하면 상황에 따라 계속 변경 됨
** 화면을 끝으로 이동하였을 때 offset + extend = range 가 된다.
- 참고 이미지 : HorizontalScrollView 에서의 각 수치들 설명 이미지 (http://android.keicode.com/basics/ui-custom-horizontalscrollview.php)
- 파란색 : 스크롤 가능한 View 전체
- 주황색 : 눈에 보여지는 View 의 영역
출처: http://ymson.tistory.com/entry/RecyclerView-의-Scroll-정보-얻기 [YeonMee's Tistory]
'android' 카테고리의 다른 글
TextView Ellipsis 상태인지 아닌지 확인하는 방법 (0) | 2017.11.27 |
---|---|
appbarlayout 스크롤 Enable, disable (0) | 2017.11.22 |
shape 백그라운드 컬러 다이나믹하게 적용하기 (0) | 2017.11.14 |
문자, 전화 intent (0) | 2017.11.13 |
리스트뷰, 스크롤뷰 리플 이펙트 제거 (0) | 2017.11.07 |