WearableLinearLayoutManager

open class WearableLinearLayoutManager
kotlin.Any
   ↳ androidx.wear.widget.WearableLinearLayoutManager

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).

Summary

Nested classes
abstract

Callback for interacting with layout passes.

Public constructors

Creates a WearableLinearLayoutManager for a vertical list.

<init>(context: Context!)

Creates a WearableLinearLayoutManager for a vertical list.

Public methods
open Unit

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

open Int
scrollVerticallyBy(dy: Int, recycler: Recycler!, state: State!)

open WearableLinearLayoutManager.LayoutCallback?

open Unit
onLayoutChildren(recycler: Recycler!, state: State!)

Public constructors

<init>

WearableLinearLayoutManager(context: Context!, layoutCallback: WearableLinearLayoutManager.LayoutCallback!)

Creates a WearableLinearLayoutManager for a vertical list.

Parameters
context Context!: Current context, will be used to access resources.
layoutCallback Context!: Callback to be associated with this WearableLinearLayoutManager

<init>

WearableLinearLayoutManager(context: Context!)

Creates a WearableLinearLayoutManager for a vertical list.

Parameters
context Context!: Current context, will be used to access resources.

Public methods

setLayoutCallback

open fun setLayoutCallback(layoutCallback: WearableLinearLayoutManager.LayoutCallback?): Unit

Set a particular instance of the layout callback for this WearableLinearLayoutManager. The callback will be called on the Ui thread.

Parameters
layoutCallback WearableLinearLayoutManager.LayoutCallback?:

scrollVerticallyBy

open fun scrollVerticallyBy(dy: Int, recycler: Recycler!, state: State!): Int

getLayoutCallback

open fun getLayoutCallback(): WearableLinearLayoutManager.LayoutCallback?
Return
WearableLinearLayoutManager.LayoutCallback?: the current LayoutCallback associated with this WearableLinearLayoutManager.

onLayoutChildren

open fun onLayoutChildren(recycler: Recycler!, state: State!): Unit