Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

LayoutCallback

abstract class LayoutCallback
kotlin.Any
   ↳ androidx.wear.widget.WearableLinearLayoutManager.LayoutCallback

Callback for interacting with layout passes.

Summary

Public constructors

Callback for interacting with layout passes.

Public methods

abstract Unit
onLayoutFinished(child: View!, parent: RecyclerView!)

Override this method to implement custom child layout behavior on scroll.

Public constructors

<init>

LayoutCallback()

Callback for interacting with layout passes.

Public methods

onLayoutFinished

abstract fun onLayoutFinished(child: View!, parent: RecyclerView!): Unit

Override this method to implement custom child layout behavior on scroll. It is called at the end of each layout pass of the view (including scrolling) and enables you to modify any property of the child view. Examples include scaling the children based on their distance from the center of the parent, or changing the translation of the children to create an illusion of the path they are moving along.

Parameters
child View!: the current child to be affected.
parent View!: the RecyclerView parent that this class is attached to.