`allowFontScaling={false}` doesn't work with TextInput's placeholder in Android.
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
react-native -v
: 0.43.4node -v
: v6.11.2npm -v
: 3.10.10yarn --version
: 0.24.5
Then, specify:
- Target Platform: Android
- Development Operating System: macOS
- Build tools: Android Studio, buildToolsVersion “23.0.1”
Steps to Reproduce
(Write your steps here:)
- Use
TextInput
in the project - set
allowFontScaling={false}
the component
Expected Behavior
Text and placeholder size shouldn’t be scaled when user set font size.
Actual Behavior
- Text size don’t be scaled.(It’s right.)
- Placeholder size still be scaled.(I think that it’s unreasonable.)
Reproducible Demo
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:11
Top Results From Across the Web
allowFontScaling={false}` doesn't work with TextInput's ...
When I set allowFontScaling={false} for TextInput must be Text size don't be scaled.(It's right.) but Placeholder size still be scaled (I ...
Read more >[Android] allowFontScaling prop on TextInput does not disable ...
This approach worked for everything except the placeholder text on TextInput elements on ... allowFontScaling = false; doesn't work at all.
Read more >TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, such as auto-correction, ...
Read more >placeholder - CSS: Cascading Style Sheets - MDN Web Docs
The ::placeholder CSS pseudo-element represents the placeholder text in an or element.
Read more >Text in Compose - Jetpack - Android Developers
Working with fonts. Text has a fontFamily parameter to allow setting the font used in the composable. By default, serif, sans ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This really is a problem in both ios and android.
For placeholder fontSize change issue @NelGarbuzova 's solution works. To fix font changing while inputting text the workaround is to -
It will fix your fontSize and won’t change because of system settings for both android and iOS. For this workaround don’t set allowFontScaling to false.