Is TextAlign supposed to be working in `BasicTextF...
# compose
n
Is TextAlign supposed to be working in
BasicTextField
? The three fields below all have text set
"x"
, and alignment is TextAlign.Start, Center and End. I'm setting the alignment from text style.
Seems to be related to
singleLine = true
c
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
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
Interesting. Worth filing a bug if it didn't work like you expected it? Might save someone some time in the future.