mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 01:15:00 +08:00
RNTester: Add allowFontScaling example to Android (#22991)
Summary: iOS's `allowFontScaling` example was copied to Android. Also, I added a case illustrating that `allowFontScaling` gets inherited in nested `<Text>` scenarios. This tests the bug fix from #22917. This nested case was added to both iOS and Android. Also, moved the comment in `TextAttributes.java` from the top of the file to the top of the class definition as requested in #22917. Pull Request resolved: https://github.com/facebook/react-native/pull/22991 Differential Revision: D13671380 Pulled By: cpojer fbshipit-source-id: a8aae4f051c76391e33bdbd6bdc80aff9b7de5cd
This commit is contained in:
committed by
Facebook Github Bot
parent
0db0d263ac
commit
7d881c1d8a
@@ -5,6 +5,11 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ViewDefaults;
|
||||
|
||||
/*
|
||||
* Currently, TextAttributes consists of a subset of text props that need to be passed from parent
|
||||
* to child so inheritance can be implemented correctly. An example complexity that causes a prop
|
||||
@@ -12,12 +17,6 @@
|
||||
* the rendered aka effective value. For example, to figure out the rendered/effective font size,
|
||||
* you need to take into account the fontSize and allowFontScaling props.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ViewDefaults;
|
||||
|
||||
public class TextAttributes {
|
||||
private boolean mAllowFontScaling = true;
|
||||
private float mFontSize = Float.NaN;
|
||||
|
||||
Reference in New Issue
Block a user