, and alignment is TextAlign.Start, Center and End. I'm setting the alignment from text style.
natario1
05/21/2021, 3:21 PM
Seems to be related to
singleLine = true
c
Colton Idle
05/21/2021, 3:50 PM
Not sure if it's actually related without seeing the code, but text alignment also doesn't work correctly if your theme uses letter spacing.
Edit: Here's my issue I opened, but it's not even compose specific. https://issuetracker.google.com/issues/183835422 As a stop gap, you should be able to take your text style,
copy()
, and set the letter spacing to 0?
n
natario1
05/21/2021, 4:00 PM
I deleted the code already, "fixed" the issue by setting singleLine to false. But the text style that I used has
TextUnit.Unspecified
FWIW
👍 1
c
Colton Idle
05/21/2021, 4:14 PM
Interesting. Worth filing a bug if it didn't work like you expected it? Might save someone some time in the future.