added in version 26.1.0
belongs to Maven artifact


public class WearableLinearLayoutManager
extends LinearLayoutManager


This wear-specific implementation of LinearLayoutManager provides basic offsetting logic for updating child layout. For round devices it offsets the children horizontally to make them appear to travel around a circle. For square devices it aligns them in a straight list. This functionality is provided by the CurvingLayoutCallback which is set when constructing the this class with its default constructor WearableLinearLayoutManager(Context).


Nested classes

class WearableLinearLayoutManager.LayoutCallback

Callback for interacting with layout passes. 

Inherited XML attributes

From class
From class

Inherited constants

From class

Public constructors

WearableLinearLayoutManager(Context context, WearableLinearLayoutManager.LayoutCallback layoutCallback)

Creates a WearableLinearLayoutManager for a vertical list.

WearableLinearLayoutManager(Context context)

Creates a WearableLinearLayoutManager for a vertical list.

Public methods

WearableLinearLayoutManager.LayoutCallback getLayoutCallback()
void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state)

Lay out all relevant child views from the given adapter.

int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state)

Scroll vertically by dy pixels in screen coordinates and return the distance traveled.

void setLayoutCallback(WearableLinearLayoutManager.LayoutCallback layoutCallback)

Set a particular instance of the layout callback for this WearableLinearLayoutManager.

Inherited methods

From class