intcomputeHorizontalScrollExtent()

Compute the horizontal extent of the horizontal scrollbar's thumb within the horizontal range.

intcomputeHorizontalScrollOffset()

Compute the horizontal offset of the horizontal scrollbar's thumb within the horizontal range.

intcomputeHorizontalScrollRange()

Compute the horizontal range that the horizontal scrollbar represents.

intcomputeVerticalScrollExtent()

Compute the vertical extent of the vertical scrollbar's thumb within the vertical range.

intcomputeVerticalScrollOffset()

Compute the vertical offset of the vertical scrollbar's thumb within the vertical range.

intcomputeVerticalScrollRange()

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 의 영역

HorizontalScrollView



출처: http://ymson.tistory.com/entry/RecyclerView-의-Scroll-정보-얻기 [YeonMee's Tistory]

+ Recent posts