You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I found that the method state.addParagraphStyle(ParagraphStyle(textAlign = TextAlign.Center)) doesn't work. No matter what I specify as a parameter (TextAlign.Center or TextAlign.Right), it always remains the same.
I have the following code:
When I click on this button I see the following log - "textAlign: Left".
I also tried specifying state.toggleParagraphStyle(ParagraphStyle(textAlign = TextAlign.Center)).
The changes are reflected in the editor, the text is aligned left and right, as well as centered. But the currentParagraphStyle state does not change, it always remains as Left.
The text was updated successfully, but these errors were encountered:
SanEffect
changed the title
Methods addParagraphStyle/toggleParagraphStyle doesn't work
The property currentParagraphStyle doesn't change its state
Jan 31, 2024
Hello.
I found that the method state.addParagraphStyle(ParagraphStyle(textAlign = TextAlign.Center)) doesn't work. No matter what I specify as a parameter (TextAlign.Center or TextAlign.Right), it always remains the same.
I have the following code:
When I click on this button I see the following log - "textAlign: Left".
I also tried specifying state.toggleParagraphStyle(ParagraphStyle(textAlign = TextAlign.Center)).
The changes are reflected in the editor, the text is aligned left and right, as well as centered. But the currentParagraphStyle state does not change, it always remains as Left.
Jetpack Compose Version: 1.6.0
Material3 Version: 1.1.2
The text was updated successfully, but these errors were encountered: