Slide 152
Slide 152 text
private class SizeNode(var width: Dp): LayoutModifierNode, *. {
override fun MeasureScope.measure(*.): MeasureResult {
val wrappedConstraints = ** *. */
val placeable = measurable.measure(wrappedConstraints)
return layout(placeable.width, placeable.height) {
placeable.placeRelative(0, 0)
}
}
}
class TabIndicatorOffsetNode(*.) : LayoutModifierNode, *. {
override fun MeasureScope.measure(*.): MeasureResult {
** *. */
val placeable = measurable.measure(wrappedConstraints)
return layout(placeable.width, placeable.height) {
placeable.placeRelative(0, 0)
}
}
}
移行の事例