Hey guys, I started jetpack compose I am getting c...
# compose
v
Hey guys, I started jetpack compose I am getting confused in width and height. In xml we use WRAP_CONTENT/MATCH_PARENT so what we use in compose?
a
Copy code
- Modifier.size(w, h)
- Modifier.size(size)

- Modifier.width(w).height(h)

- Modifier.fillMaxWidth(weight = 1F)
- Modifier.fillMaxHeight(weight = 1F)
- Modifier.fillMaxSize(weight = 1F)
For some of the basics
The canonical layouts:
Row
,
Column
,
Box
should all shrink to fit
v
great thanks a million
a
The docs are very descriptive as to what each does: https://developer.android.com/jetpack/compose/modifiers-list#Size
👍 1