forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android Text component allowFontScaling
Summary: The reason for this change is to implement `allowFontScaling` on the Android's React Native Text component. Prior to this PR `allowFontScaling` only works for iOS. The following link contains images of `allowFontScaling` working in Android on small, normal, large, and huge system fonts (from native Android display settings) http://imgur.com/a/94bF1 The following link is a video of the same thing working on an Android emulator https://youtu.be/1jTlZhPdj9Y Here is the sample code snippet driving the video/images ``` render() { const size = [12, 14, 16, 18]; return ( <View style={{backgroundColor: 'white', flex: 1}}> <Text> Default size no allowFontScaling prop (default true) </Text> <Text allowFontScaling={true}> Default size allowFontScaling: true </Text> <Text style={{ marginBottom: 10, }} allowFontScaling={false}> Default size allowFontScaling: false </Text> { size.map( Closes facebook#10898 Differential Revision: D4335190 Pulled By: lacker fbshipit-source-id: 0480809c44983644ff2abfcaf4887569b2bfede5
- Loading branch information
1 parent
23e2610
commit 4394419
Showing
3 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters