I am new in android development. Can anybody expla...
# compose
a
I am new in android development. Can anybody explain with effect the impact of column vs flexcolumn, row vs flexRow, flexible vs inflexible. I am not able to understand when to use what.
l
Don’t worry,
Flex
are most likely to go away
a
And what is the purpose of flexible and inflexible ?
a
Let's say you want to have two components in a row - one with a defined size (e.g. image) and the other one should take all of the remaining space (e.g. text field). For the image you just specify the size and keep it inflexible (which is a default) so it will be of that size. But to express in the code that textfield "should occupy the remaining space" you use Flexible(1f) modifier. You can find examples with the explanations here https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui/ui-layout/integration-tests/samples/src/main/java/androidx/ui/layout/samples/FlexSample.kt?autodive=0%2F%2F%2F%2F%2F#90