diff options
author | Maurice Lam <yukl@google.com> | 2015-03-30 17:09:42 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-30 17:09:42 +0000 |
commit | 452558270fd3a2b836be33673ab81ce07e4a600c (patch) | |
tree | a00cd7b6816127eacfc740eb0f8c6a7a0d4f0f22 | |
parent | a183f1a46eec94c32a4da8fb7eaba63dca81646b (diff) | |
parent | 83c3c51890c8cee83822fd41d323728b8ed2b254 (diff) | |
download | android_frameworks_opt_setupwizard-452558270fd3a2b836be33673ab81ce07e4a600c.tar.gz android_frameworks_opt_setupwizard-452558270fd3a2b836be33673ab81ce07e4a600c.tar.bz2 android_frameworks_opt_setupwizard-452558270fd3a2b836be33673ab81ce07e4a600c.zip |
am 83c3c518: [SetupWizardLib] Fix setup wizard crash
* commit '83c3c51890c8cee83822fd41d323728b8ed2b254':
[SetupWizardLib] Fix setup wizard crash
-rw-r--r-- | library/main/src/com/android/setupwizardlib/view/NavigationBar.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/main/src/com/android/setupwizardlib/view/NavigationBar.java b/library/main/src/com/android/setupwizardlib/view/NavigationBar.java index 2228e69..3d88593 100644 --- a/library/main/src/com/android/setupwizardlib/view/NavigationBar.java +++ b/library/main/src/com/android/setupwizardlib/view/NavigationBar.java @@ -136,10 +136,12 @@ public class NavigationBar extends LinearLayout implements View.OnClickListener // The color of the button is #de000000 / #deffffff when enabled. When disabled, the // alpha value = 0x3b/0xff * 0xde/0xff = 20%. final int alpha = enabled ? 0xff : 0x3b; - getTextColors().withAlpha(alpha); + setTextColor(getTextColors().withAlpha(alpha)); final Drawable[] compoundDrawables = getCompoundDrawables(); for (Drawable d : compoundDrawables) { - d.setAlpha(alpha); + if (d != null) { + d.setAlpha(alpha); + } } } } |