added in version 26.1.0
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1

CurvingLayoutCallback

public class CurvingLayoutCallback
extends WearableLinearLayoutManager.LayoutCallback

java.lang.Object
   ↳ android.support.wear.widget.WearableLinearLayoutManager.LayoutCallback
     ↳ android.support.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

CurvingLayoutCallback(Context context)

Public methods

void adjustAnchorOffsetXY(View child, float[] anchorOffsetXY)

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

void onLayoutFinished(View child, RecyclerView parent)

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

Inherited methods

From class android.support.wear.widget.WearableLinearLayoutManager.LayoutCallback
From class java.lang.Object

Public constructors

CurvingLayoutCallback

added in version 26.1.0
CurvingLayoutCallback (Context context)

Parameters
context Context

Public methods

adjustAnchorOffsetXY

added in version 26.1.0
void adjustAnchorOffsetXY (View child, 
                float[] anchorOffsetXY)

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 float: 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

added in version 26.1.0
void onLayoutFinished (View child, 
                RecyclerView parent)

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 RecyclerView: the RecyclerView parent that this class is attached to.