CurvingLayoutCallback

open class CurvingLayoutCallback : WearableLinearLayoutManager.LayoutCallback
kotlin.Any
   ↳ androidx.wear.widget.WearableLinearLayoutManager.LayoutCallback
   ↳ androidx.wear.widget.CurvingLayoutCallback

An implementation of the WearableLinearLayoutManager.LayoutCallback aligning the children of the associated WearableRecyclerView along a pre-defined vertical curve.

Summary

Public constructors

<init>(context: Context!)

Public methods

open Unit
adjustAnchorOffsetXY(child: View!, anchorOffsetXY: FloatArray!)

Override this method if you wish to adjust the anchor coordinates for each child view during a layout pass.

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

Public constructors

<init>

CurvingLayoutCallback(context: Context!)

Public methods

adjustAnchorOffsetXY

open fun adjustAnchorOffsetXY(child: View!, anchorOffsetXY: FloatArray!): Unit

Override this method if you wish to adjust the anchor coordinates for each child view during a layout pass. In the override set the new desired anchor coordinates in the provided array. The coordinates should be provided in relation to the child view.

Parameters
child View!: The child view to which the anchor coordinates will apply.
anchorOffsetXY View!: The anchor coordinates for the provided child view, by default set to a pre-defined constant on the horizontal axis and half of the child height on the vertical axis (vertical center).

onLayoutFinished

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