Laurence Muller
03/22/2023, 1:35 AMLazyVerticalGrid
where the items are 2 x N
, is it possible for a given row to set both items to the max height of either row? My use case is that I have a tile where a title can wrap 1 or 2 rows. But I like the bottom divider and user image to be aligned at the bottom of the tile. I can’t set a fixed height because if both tiles have a title of 1 line or both have 2 lines, no adjustment is needed. Only when the left tile and right tile have a different number of lines, I would like to add a spacer or some way to push the divider + user image/details to the bottomLaurence Muller
03/22/2023, 1:37 AMChris Sinco [G]
03/22/2023, 3:18 AMOleksandr Balan
03/22/2023, 7:00 AMminLines
for BasicText
.
If you set minLines = 2 for the title it should do the trick.
https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.4.0-alpha02Oleksandr Balan
03/22/2023, 7:26 AMheightInLines
modifier:
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]q=heightInLines&ss=androidx%2Fplatform%2Fframeworks%2Fsupport
You would also need to copy computeSizeForDefaultText
internal method:
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]eForDefaultText&ss=androidx%2Fplatform%2Fframeworks%2Fsupportefemoney
03/22/2023, 8:53 AMLaurence Muller
03/22/2023, 1:41 PMOleksandr Balan
03/22/2023, 2:08 PMWhitespace between “CookieMonster” and “Upcoming Auction”Yeap, and both “Upcoming Auction” and “Staringat $0" will be aligned on left and right tiles
between “Starting at $0” and the grey dividerI guess you will need a custom layout then 🤔