mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Android: Add a maxFontSizeMultiplier prop to <Text> and <TextInput> (#23069)
Summary: Equivalent of this iOS PR: https://github.com/facebook/react-native/pull/20915 Motivation: ---------- Whenever a user changes the system font size to its maximum allowable setting, React Native apps that allow font scaling can become unusable because the text gets too big. Experimenting with a native app like iMessage on iOS, the font size used for non-body text (e.g. header, navigational elements) is capped while the body text (e.g. text in the message bubbles) is allowed to grow. This PR introduces a new prop on `<Text>` and `<TextInput>` called `maxFontSizeMultiplier`. This enables devs to set the maximum allowed text scale factor on a Text/TextInput. The default is 0 which means no limit. Pull Request resolved: https://github.com/facebook/react-native/pull/23069 Differential Revision: D13748513 Pulled By: mdvacca fbshipit-source-id: 8dd5d6d97bf79387d9a2236fa2e586ccb01afde9
This commit is contained in:
committed by
Facebook Github Bot
parent
5bc709d517
commit
4936d284df
@@ -106,6 +106,7 @@ public class ViewProps {
|
||||
public static final String VISIBLE = "visible";
|
||||
|
||||
public static final String ALLOW_FONT_SCALING = "allowFontScaling";
|
||||
public static final String MAX_FONT_SIZE_MULTIPLIER = "maxFontSizeMultiplier";
|
||||
public static final String INCLUDE_FONT_PADDING = "includeFontPadding";
|
||||
|
||||
public static final String BORDER_WIDTH = "borderWidth";
|
||||
|
||||
Reference in New Issue
Block a user