How can I put a bigger composable in a smaller parent (both with fixed sizes), so that it's clipped? (like would happen by default with Views) My child composable just resizes itself to fit into the parent, which I don't want. I tried using
requiredWidth()
but that centers it inside the parent (it overflows to both sides), where I want it left-aligned and clipped on the right.
✅ 1
a
Adam Powell
01/12/2022, 3:36 PM
Use
Modifier.layout {}
to write a layout modifier that permits a larger max size for the child than the incoming constraints, then place the child as desired