mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add two more version checks for ReactTextView recycling
Summary: setFocusable(int) was added in Android O, and setHyphenationFreqauency was added in M. Changelog: [Internal] Reviewed By: kacieb Differential Revision: D37462117 fbshipit-source-id: e59d2de49dbdcddfdba25def6bb39695c65efe89
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0646551d76
commit
cf0a0eff1b
@@ -140,9 +140,13 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
|
||||
// mViewFlags = SOUND_EFFECTS_ENABLED | HAPTIC_FEEDBACK_ENABLED |
|
||||
// LAYOUT_DIRECTION_INHERIT;
|
||||
setEnabled(true);
|
||||
setFocusable(View.FOCUSABLE_AUTO);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
setFocusable(View.FOCUSABLE_AUTO);
|
||||
}
|
||||
|
||||
setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
|
||||
}
|
||||
|
||||
updateView(); // call after changing ellipsizeLocation in particular
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user