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.
BREAKING: Android: Correct value of Dimensions.get('screen').fontScale
Summary: The PR description has been updated to reflect the new approach. **Breaking Change Summary** On Android, the following properties now return a different number: - `Dimensions.get('window').fontScale` - `Dimensions.get('screen').fontScale` - `PixelRatio.getFontScale()` This is a breaking change to anyone who was using these properties because the meaning of these properties has now changed. These properties used to return a value representing font scale times density ([`DisplayMetrics.scaledDensity`](https://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity)). Now they return a value representing just font scale ([`Configuration.fontScale`](https://developer.android.com/reference/android/content/res/Configuration.html#fontScale)). **PR Description** This PR changes a few things: - Correctly exposes the font scale to JavaScript as `Dimensions.get('screen').fontScale`. UIManager was exporting `DisplayMetrics.scaledDensity` under the name `fontScale`. How Closes facebook#11008 Differential Revision: D4558207 Pulled By: astreet fbshipit-source-id: 096ce7b28051325dfd45fdb2a14b5e9b7d3bc46f
- Loading branch information
Adam Comella
authored and
dudeinthemirror
committed
Mar 1, 2017
1 parent
f7ccd56
commit 053094b
Showing
5 changed files
with
107 additions
and
54 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
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