Incorrect lines in onTextLayout when using textAlign: 'justify' in Android #50226
Labels
Needs: Attention
Issues where the author has responded to feedback.
Platform: Android
Android applications.
Type: Unsupported Version
Issues reported to a version of React Native that is no longer supported
Description
As you can see, this is the rendered text in the device (Android)
But when I get the lines from
onTextLayout
, I get the following lines:These lines are the original lines before
textAlign: 'justify'
is applied, but I want to get the lines when justify alignment is applied.I compared the behavior to iOS, the way iOS justify the text is different, it keeps the lines are they are without pushing the text to fill the space (as in the 4th line).
I want rendered text and text returned from
onTextLayout
to be the same, is there anyway to achieve that?Steps to reproduce
https://snack.expo.dev/@abdel.moun/incorrect-lines
React Native Version
0.74.3
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@abdel.moun/incorrect-lines
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: