Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Actually, it appears that it might not work outside of dialogs either.
so...@google.com <so...@google.com> #3
I assume this WAI. If there is at least a single weight
'ed child, then the Column occupies the whole space given (by taking its maximum constraints).
Mihai, should we instead consider wrapping the content if the weight > 0
caused only by children with fill == false
?
po...@google.com <po...@google.com> #4
Thanks for reporting this! As Anastasia suggested, this is WAI currently. Also I agree with Anastasia's suggestion and this will be fixed soon.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit a153977dfc2a43aadb38a1e5a1a151336f8c2360
Author: Mihai Popa <popam@google.com>
Date: Thu Apr 22 18:34:55 2021
Row/Column wrap content if no weight+fill child
Relnote: "Row & Column children with weight(fill = false) are no longer making the parent fill the entire available main axis space."
Fixes: 186012444
Fixes: 184355105
Test: RowColumnTest + manual testing for AlertDialog
Change-Id: Ied94da682f4cf6ead5b91e06ba08904c1a349b9f
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/RowColumnTest.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/RowColumnImpl.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/AlertDialog.kt
https://android-review.googlesource.com/1684872
Branch: androidx-main
commit a153977dfc2a43aadb38a1e5a1a151336f8c2360
Author: Mihai Popa <popam@google.com>
Date: Thu Apr 22 18:34:55 2021
Row/Column wrap content if no weight+fill child
Relnote: "Row & Column children with weight(fill = false) are no longer making the parent fill the entire available main axis space."
Fixes: 186012444
Fixes: 184355105
Test: RowColumnTest + manual testing for AlertDialog
Change-Id: Ied94da682f4cf6ead5b91e06ba08904c1a349b9f
M compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/RowColumnTest.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/RowColumnImpl.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/AlertDialog.kt
Description
Component used:
ui
Version used:
1.0.0-beta05
Devices/Android versions reproduced on:
Pixel 5
I have a dialog with content that might not fit so I would like the content to wrap its content and scroll if it doesn't fit. To do this I am using
Modifier.weight(1f, fill = false)
. When placed inside the dialog however the content does wrap but the dialogs height fills the whole screen.As you can see in the screenshot there is extra space below the "cancel" button which is unexpected. If the content is placed outside of a
Dialog
it works as expected.The code in question is: