Please sign in to comment.
Fix textTransform when used with other text styles on Android (#22670)
Summary: On Android `textTransform` breaks other styles applied to the text. It seems related to the usage of `ReplacementSpan` which allows drawing the text manually but seems to throw away some changes made by other span applied to the text. To fix it I removed the usage of `ReplacementSpan` and simply transform the text before appending it to the `Spannable` string. To make sure textTransform is inherited correctly I added it to TextAttributes which handles this. Pull Request resolved: #22670 Differential Revision: D13494819 Pulled By: cpojer fbshipit-source-id: 1c69591084aa906c2d3b10153b354d39c0936340
- Loading branch information...
Showing with 92 additions and 109 deletions.
- +14 −0 RNTester/js/TextExample.android.js
- +0 −83 ReactAndroid/src/main/java/com/facebook/react/views/text/CustomTextTransformSpan.java
- +13 −15 ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java
- +11 −0 ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributes.java
- +6 −10 ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java
- +48 −1 ReactAndroid/src/main/java/com/facebook/react/views/text/TextTransform.java
Oops, something went wrong.