diff options
| author | 2017-03-24 11:11:16 +0000 | |
|---|---|---|
| committer | 2017-03-24 11:11:23 +0000 | |
| commit | 7c9e897c7db00114bdd2d1ddafa3badfe7e26e5e (patch) | |
| tree | 1866360905d0e2df6edea66b0b80e4a7d490a6bc | |
| parent | 81b034d4f83998b15ef94aa0c4b7c33d06b34606 (diff) | |
| parent | 576ee7de7d169e637439e992a5e9d92ea5829989 (diff) | |
Merge "Fix textStyle being ignored for Font resources in TextView"
| -rw-r--r-- | core/java/android/widget/TextView.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 8d0ea08ba593..bc7c79d2e701 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -2031,6 +2031,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Typeface tf = fontTypeface; if (tf == null && familyName != null) { tf = Typeface.create(familyName, styleIndex); + } else if (tf != null && tf.getStyle() != styleIndex) { + tf = Typeface.create(tf, styleIndex); } if (tf != null) { setTypeface(tf); |