c0ea23cfb0
Summary: Android has a text API called breakStrategy for controlling how paragraphs are broken up into lines. For example, some modes support automatically hyphenating words so a word can be split across lines while others do not. One source of complexity is that Android provides different defaults for `breakStrategy` for `TextView` vs `EditText`. `TextView`'s default is `BREAK_STRATEGY_HIGH_QUALITY` while `EditText`'s default is `BREAK_STRATEGY_SIMPLE`. In addition to exposing `textBreakStrategy`, this change also fixes a couple of rendering glitches with `Text` and `TextInput`. `TextView` and `EditText` have different default values for `breakStrategy` and `hyphenationFrequency` than `StaticLayout`. Consequently, we were using different parameters for measuring and rendering. Whenever measuring and rendering parameters are inconsistent, it can result in visual glitches such as the text taking up too much space or being clipped. This change fixes these inconsistencies by setting `breakStrategy` and `hyphenat Closes https://github.com/facebook/react-native/pull/11007 Differential Revision: D4227495 Pulled By: lacker fbshipit-source-id: c2d96bd0ddc7bd315fda016fb4f1b5108a2e35cf |
||
---|---|---|
.. | ||
TextInput.js | ||
TextInputState.js |