react-native/Libraries/Text
Adam Comella c0ea23cfb0 Android: Expose textBreakStrategy on Text and TextInput
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
2016-12-16 01:28:45 -08:00
..
RCTText.xcodeproj Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
RCTConvert+Text.h iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTConvert+Text.m iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTRawTextManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRawTextManager.m Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
RCTShadowRawText.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTShadowRawText.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTShadowText.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTShadowText.m Rename C api 2016-12-03 04:44:10 -08:00
RCTText.h Added support of `<Text>`'s `selectable` attribute on iOS 2016-11-17 16:13:28 -08:00
RCTText.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextField.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextField.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextFieldManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextFieldManager.m iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTTextManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextManager.m Rename directories 2016-12-07 05:14:12 -08:00
RCTTextSelection.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextSelection.m Add TextInput controlled selection prop on iOS 2016-08-25 17:28:37 -07:00
RCTTextView.h iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTTextView.m iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
RCTTextViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTextViewManager.m iOS: Introduce spellCheck prop to TextInput 2016-11-25 04:28:28 -08:00
Text.js Android: Expose textBreakStrategy on Text and TextInput 2016-12-16 01:28:45 -08:00
TextStylePropTypes.js <Text> Expose Android's includeFontPadding property to JavaScript. 2016-12-02 12:58:36 -08:00
TextUpdateTest.js RN: Update React (2/2) 2016-11-04 05:43:44 -07:00