ScrollingView

Added in 1.1.0

public interface ScrollingView

Known direct subclasses
NestedScrollView

NestedScrollView is just like ScrollView, but it supports acting as both a nested scrolling parent and child on both new and old versions of Android.

RecyclerView

A flexible view for providing a limited window into a large data set.

Known indirect subclasses
BaseGridView

An abstract base class for vertically and horizontally scrolling lists.

HorizontalGridView

A android.view.ViewGroup that shows items in a horizontal scrolling list.

VerticalGridView

A android.view.ViewGroup that shows items in a vertically scrolling list.

WearableRecyclerView

Wearable specific implementation of the RecyclerView enabling setCircularScrollingGestureEnabled circular scrolling} and semi-circular layouts.


An interface that can be implemented by Views to provide scroll related APIs.

Summary

Public methods

abstract int

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

abstract int

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

abstract int

Compute the horizontal range that the horizontal scrollbar represents.

abstract int

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

abstract int

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

abstract int

Compute the vertical range that the vertical scrollbar represents.

Public methods

computeHorizontalScrollExtent

Added in 1.1.0
abstract int computeHorizontalScrollExtent()

Compute the horizontal extent of the horizontal scrollbar's thumb within the horizontal range. This value is used to compute the length of the thumb within the scrollbar's track.

The range is expressed in arbitrary units that must be the same as the units used by computeHorizontalScrollRange and computeHorizontalScrollOffset.

The default extent is the drawing width of this view.

Returns
int

the horizontal extent of the scrollbar's thumb

computeHorizontalScrollOffset

Added in 1.1.0
abstract int computeHorizontalScrollOffset()

Compute the horizontal offset of the horizontal scrollbar's thumb within the horizontal range. This value is used to compute the position of the thumb within the scrollbar's track.

The range is expressed in arbitrary units that must be the same as the units used by computeHorizontalScrollRange and computeHorizontalScrollExtent.

The default offset is the scroll offset of this view.

Returns
int

the horizontal offset of the scrollbar's thumb

computeHorizontalScrollRange

Added in 1.1.0
abstract int computeHorizontalScrollRange()

Compute the horizontal range that the horizontal scrollbar represents.

The range is expressed in arbitrary units that must be the same as the units used by computeHorizontalScrollExtent and computeHorizontalScrollOffset.

The default range is the drawing width of this view.

Returns
int

the total horizontal range represented by the horizontal scrollbar

computeVerticalScrollExtent

Added in 1.1.0
abstract int computeVerticalScrollExtent()

Compute the vertical extent of the vertical scrollbar's thumb within the vertical range. This value is used to compute the length of the thumb within the scrollbar's track.

The range is expressed in arbitrary units that must be the same as the units used by computeVerticalScrollRange and computeVerticalScrollOffset.

The default extent is the drawing height of this view.

Returns
int

the vertical extent of the scrollbar's thumb

computeVerticalScrollOffset

Added in 1.1.0
abstract int computeVerticalScrollOffset()

Compute the vertical offset of the vertical scrollbar's thumb within the horizontal range. This value is used to compute the position of the thumb within the scrollbar's track.

The range is expressed in arbitrary units that must be the same as the units used by computeVerticalScrollRange and computeVerticalScrollExtent.

The default offset is the scroll offset of this view.

Returns
int

the vertical offset of the scrollbar's thumb

computeVerticalScrollRange

Added in 1.1.0
abstract int computeVerticalScrollRange()

Compute the vertical range that the vertical scrollbar represents.

The range is expressed in arbitrary units that must be the same as the units used by computeVerticalScrollExtent and computeVerticalScrollOffset.

Returns
int

the total vertical range represented by the vertical scrollbar

The default range is the drawing height of this view.