Repository navigation
Commit 83604bd
Skip the unused getDesiredWidth pass when creating Android text layouts
TextLayoutManager.createLayout measured the whole string with
Layout.getDesiredWidth before building a StaticLayout even when the result
could not affect the layout width: for an EXACTLY width, and for boring text
that did not fit (min(desired, available) is then always available).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 8aa97bb commit 83604bd
1 file changed
Lines changed: 15 additions & 6 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
880 | | - | |
881 | | - | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
882 | 884 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
887 | 896 | | |
888 | 897 | | |
889 | 898 | | |
| |||
0 commit comments