CurvingLayoutCallback
open class CurvingLayoutCallback : WearableLinearLayoutManager.LayoutCallback
An implementation of the WearableLinearLayoutManager.LayoutCallback
aligning the children of the associated WearableRecyclerView
along a pre-defined vertical curve.
Summary
Public methods
|
open Unit |
Override this method if you wish to adjust the anchor coordinates for each child view during a layout pass.
|
open Unit |
|
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). |