diff options
author | Alan Viverette <alanv@google.com> | 2014-06-05 21:00:32 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-05 21:00:32 +0000 |
commit | c954e61cd73875e74115c778cb5e35eab9695a59 (patch) | |
tree | ab3065d28516570d2847d6bc9206b67e97cdb576 /core/java/com | |
parent | 70dbeacadcd2a8469ff7d451c570d8236cb96370 (diff) | |
parent | 4586b0da631758e2753c3f0936f410ff3a6c3bda (diff) | |
download | frameworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.zip frameworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.tar.gz frameworks_base-c954e61cd73875e74115c778cb5e35eab9695a59.tar.bz2 |
am 3966c960: Merge "Add defaults for caption colors and edge type" into lmp-preview-dev
* commit '3966c9604e55c9183a6d1ba8b3540add3be4434f':
Add defaults for caption colors and edge type
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/widget/SubtitleView.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/com/android/internal/widget/SubtitleView.java b/core/java/com/android/internal/widget/SubtitleView.java index 117463a..2f987e9 100644 --- a/core/java/com/android/internal/widget/SubtitleView.java +++ b/core/java/com/android/internal/widget/SubtitleView.java @@ -271,10 +271,13 @@ public class SubtitleView extends View { style = CaptionStyle.PRESETS[styleId]; } - mForegroundColor = style.foregroundColor; - mBackgroundColor = style.backgroundColor; - mEdgeType = style.edgeType; - mEdgeColor = style.edgeColor; + final CaptionStyle defStyle = CaptionStyle.DEFAULT; + mForegroundColor = style.hasForegroundColor() ? + style.foregroundColor : defStyle.foregroundColor; + mBackgroundColor = style.hasBackgroundColor() ? + style.backgroundColor : defStyle.backgroundColor; + mEdgeType = style.hasEdgeType() ? style.edgeType : defStyle.edgeType; + mEdgeColor = style.hasEdgeColor() ? style.edgeColor : defStyle.edgeColor; mHasMeasurements = false; final Typeface typeface = style.getTypeface(); |