mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 22:56:32 +08:00
Summary: Made some improvements to RCTText based on some of our learnings from components for android. This now resembles diffusion/FBS/browse/master/fbandroid/java/com/facebook/components/widget/TextSpec.java Things that have improved: - Calculation of text width is now faster (we noticed in components that .getWith() on the layout is all that is needed and it is much faster) - Use text layout builder to abstract away a lot of the low level details of static / boring layouts and text measurements - Handle MeasureMode correctly, previously AT_MOST was not supported. - Better handling of RTL text by using TextLayoutBuilder where I made changes to support RTL text in components. Specifically RTL text measured with UNSPECIFIED or AT_MOST. - There was an incorrect assumption being made that when measure() was not called the text had to be boring. This is incorrect, Arabic text is never boring for example. Also multiline text is not boring either and may have exact sizing. Reviewed By: ahmedre Differential Revision: D3374752
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.