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(
    @NonNull Context context,
    @Nullable AttributeSet attrs
)
WearableRecyclerView(
    @NonNull Context context,
    @Nullable AttributeSet attrs,
    @NonNull int defStyle
)
WearableRecyclerView(
    @NonNull Context context,
    @Nullable AttributeSet attrs,
    @NonNull int defStyle,
    @NonNull int defStyleRes
)

Public methods

@NonNull float

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

@NonNull float

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

@NonNull boolean

Returns whether circular scrolling is enabled for this view.

@NonNull boolean

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

@Override @NonNull boolean
@NonNull void
setBezelFraction(@NonNull 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.

@NonNull void
setCircularScrollingGestureEnabled(
    @NonNull boolean circularScrollingGestureEnabled
)

Enables/disables circular touch scrolling for this view.

@NonNull void

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.

@NonNull void
setScrollDegreesPerScreen(@NonNull 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 @NonNull boolean
dispatchNestedPreScroll(
    @NonNull int dx,
    @NonNull int dy,
    @Nullable int[] consumed,
    @Nullable int[] offsetInWindow
)

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

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

Dispatch one step of a nested scroll in progress.

abstract @NonNull boolean

Begin a nestable scroll operation along the given axes.

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

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

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

Dispatch one step of a nested scroll in progress.

abstract @NonNull boolean

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

abstract @NonNull boolean

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

abstract @NonNull void

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

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

Dispatch one step of a nested scroll in progress.

From class