diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-02-19 11:05:02 -0800 |
---|---|---|
committer | Deepanshu Gupta <deepanshu@google.com> | 2014-02-19 20:17:00 +0000 |
commit | 13aea18b34e527cffeaa6cb81f5ecb7c4a66cb11 (patch) | |
tree | 886399c5ad8374602306c9db0501e444540239ba | |
parent | 45dbfcc781a3926d22571b6ccfa3f27ec896f119 (diff) | |
download | frameworks_base-13aea18b34e527cffeaa6cb81f5ecb7c4a66cb11.zip frameworks_base-13aea18b34e527cffeaa6cb81f5ecb7c4a66cb11.tar.gz frameworks_base-13aea18b34e527cffeaa6cb81f5ecb7c4a66cb11.tar.bz2 |
Set default text style in layoutlib as NORMAL [DO NOT MERGE]
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.
Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
(cherry picked from commit 0acfb16dcd95468fe032204f54618e86becfd1eb)
-rw-r--r-- | tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java index 8701cc8..b50e98b 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java @@ -103,6 +103,9 @@ public final class Typeface_Delegate { if (familyName == null) { familyName = DEFAULT_FAMILY; } + if (style < 0) { + style = Typeface.NORMAL; + } Typeface_Delegate newDelegate = new Typeface_Delegate(familyName, style); if (sFontLoader != null) { |