Skip to content

Commit 4500095

Browse files
committed
rename prop to android_hyphenationFrequency
1 parent 0c86fb4 commit 4500095

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Libraries/Text/Text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const viewConfig = {
6868
onTextLayout: true,
6969
onInlineViewLayout: true,
7070
dataDetectorType: true,
71-
androidHyphenationFrequency: true,
71+
android_hyphenationFrequency: true,
7272
},
7373
directEventTypes: {
7474
topTextLayout: {

Libraries/Text/TextProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type TextProps = $ReadOnly<{|
6262
* Set hyphenation strategy on Android.
6363
*
6464
*/
65-
androidHyphenationFrequency?: ?(
65+
android_hyphenationFrequency?: ?(
6666
| 'normal'
6767
| 'none'
6868
| 'full'

RNTester/js/examples/Text/TextExample.android.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class AdjustingFontSize extends React.Component<
146146
<Text
147147
adjustsFontSizeToFit={true}
148148
numberOfLines={4}
149-
androidHyphenationFrequency="normal"
149+
android_hyphenationFrequency="normal"
150150
style={{fontSize: 20, marginVertical: 6}}>
151151
{'Multiline text component shrinking is supported, watch as this reeeeaaaally loooooong teeeeeeext grooooows and then shriiiinks as you add text to me! ioahsdia soady auydoa aoisyd aosdy ' +
152152
' ' +
@@ -209,23 +209,23 @@ class TextExample extends React.Component<{...}> {
209209
</Text>
210210
</RNTesterBlock>
211211
<RNTesterBlock title="Hyphenation">
212-
<Text androidHyphenationFrequency="normal">
212+
<Text android_hyphenationFrequency="normal">
213213
<Text style={{color: 'red'}}>Normal: </Text>
214214
WillHaveAnHyphenWhenBreakingForNewLine
215215
</Text>
216-
<Text androidHyphenationFrequency="none">
216+
<Text android_hyphenationFrequency="none">
217217
<Text style={{color: 'red'}}>None: </Text>
218218
WillNotHaveAnHyphenWhenBreakingForNewLine
219219
</Text>
220-
<Text androidHyphenationFrequency="full">
220+
<Text android_hyphenationFrequency="full">
221221
<Text style={{color: 'red'}}>Full: </Text>
222222
WillHaveAnHyphenWhenBreakingForNewLine
223223
</Text>
224-
<Text androidHyphenationFrequency="high">
224+
<Text android_hyphenationFrequency="high">
225225
<Text style={{color: 'red'}}>High: </Text>
226226
WillHaveAnHyphenWhenBreakingForNewLine
227227
</Text>
228-
<Text androidHyphenationFrequency="balanced">
228+
<Text android_hyphenationFrequency="balanced">
229229
<Text style={{color: 'red'}}>Balanced: </Text>
230230
WillHaveAnHyphenWhenBreakingForNewLine
231231
</Text>

ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void setSelectionColor(ReactTextView view, @Nullable Integer color) {
9797
}
9898
}
9999

100-
@ReactProp(name = "androidHyphenationFrequency")
100+
@ReactProp(name = "android_hyphenationFrequency")
101101
public void setAndroidHyphenationFrequency(ReactTextView view, @Nullable String frequency) {
102102
if (frequency == null || frequency.equals("none")) {
103103
view.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
@@ -110,7 +110,7 @@ public void setAndroidHyphenationFrequency(ReactTextView view, @Nullable String
110110
} else if (frequency.equals("normal")) {
111111
view.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
112112
} else {
113-
throw new JSApplicationIllegalArgumentException("Invalid androidHyphenationFrequency: " + frequency);
113+
throw new JSApplicationIllegalArgumentException("Invalid android_hyphenationFrequency: " + frequency);
114114
}
115115
}
116116

0 commit comments

Comments
 (0)