WearableRecyclerView

public class WearableRecyclerView extends RecyclerView implements ScrollingView, NestedScrollingChild, NestedScrollingChild2, NestedScrollingChild, NestedScrollingChild2, NestedScrollingChild3

Object
   ↳ RecyclerView
     ↳ WearableRecyclerView

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

Summary

Public constructors

WearableRecyclerView(
    Context context,
    @Nullable AttributeSet attrs,
    int defStyle
)
WearableRecyclerView(
    Context context,
    @Nullable AttributeSet attrs,
    int defStyle,
    int defStyleRes
)

Public methods

float

Returns the current bezel width for circular scrolling as a fraction of the screen's radius.

float

Returns how many degrees does the user have to rotate for to scroll through one screen height.

boolean

Returns whether circular scrolling is enabled for this view.

boolean

Returns whether the view is currently configured to center the edge children.

@Override boolean
void
setBezelFraction(float fraction)

Taps within this radius and the radius of the screen are considered close enough to the bezel to be candidates for circular scrolling.

void
setCircularScrollingGestureEnabled(
    boolean circularScrollingGestureEnabled
)

Enables/disables circular touch scrolling for this view.

void
setEdgeItemsCenteringEnabled(boolean isEnabled)

Use this method to configure the WearableRecyclerView on round watches to always align the first and last items with the vertical center of the screen.

void
setScrollDegreesPerScreen(float degreesPerScreen)

Sets how many degrees the user has to rotate by to scroll through one screen height when they are using the circular scrolling gesture.The default value equates 180 degrees scroll to one screen.

Inherited methods

From class NestedScrollingChild
abstract boolean
dispatchNestedPreScroll(
    int dx,
    int dy,
    int[] consumed,
    int[] offsetInWindow
)

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

abstract boolean
dispatchNestedScroll(
    int dxConsumed,
    int dyConsumed,
    int dxUnconsumed,
    int dyUnconsumed,
    int[] offsetInWindow
)

Dispatch one step of a nested scroll in progress.

abstract boolean

Begin a nestable scroll operation along the given axes.

From class NestedScrollingChild2
abstract boolean
dispatchNestedPreScroll(
    int dx,
    int dy,
    int[] consumed,
    int[] offsetInWindow,
    @ViewCompat.NestedScrollType int type
)

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.

abstract boolean
dispatchNestedScroll(
    int dxConsumed,
    int dyConsumed,
    int dxUnconsumed,
    int dyUnconsumed,
    int[] offsetInWindow,
    @ViewCompat.NestedScrollType int type
)

Dispatch one step of a nested scroll in progress.

abstract boolean

Returns true if this view has a nested scrolling parent for the given input type.

abstract boolean

Begin a nestable scroll operation along the given axes, for the given input type.

abstract void

Stop a nested scroll in progress for the given input type.

From class NestedScrollingChild3
abstract void
dispatchNestedScroll(
    int dxConsumed,
    int dyConsumed,
    int dxUnconsumed,
    int dyUnconsumed,
    int[] offsetInWindow,
    @ViewCompat.NestedScrollType int type,
    int[] consumed
)

Dispatch one step of a nested scroll in progress.

From class RecyclerView