summaryrefslogtreecommitdiffstats
path: root/src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java')
-rw-r--r--src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java b/src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java
index 8154229..5e24c95 100644
--- a/src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java
+++ b/src/org/cyanogenmod/theme/chooserv2/ComponentCardView.java
@@ -59,7 +59,7 @@ public class ComponentCardView extends LinearLayout {
(int) r.getDimension(R.dimen.card_padding_bottom) + getPaddingBottom();
}
- public void expand() {
+ public void expand(boolean showLabel) {
TransitionDrawable bg = null;
if (getBackground() instanceof TransitionDrawable) {
bg = (TransitionDrawable) getBackground();
@@ -72,7 +72,7 @@ public class ComponentCardView extends LinearLayout {
setPadding(mExpandPadLeft, mExpandPadTop, mExpandPadRight, mExpandPadBottom);
if (mLabel != null) {
- mLabel.setAlpha(1f);
+ mLabel.setAlpha(showLabel ? 1f : 0f);
mLabel.setVisibility(View.VISIBLE);
}
}
@@ -82,7 +82,8 @@ public class ComponentCardView extends LinearLayout {
TransitionDrawable background = (TransitionDrawable) getBackground();
if (mLabel != null) {
mLabel.setVisibility(View.VISIBLE);
- mLabel.animate().alpha(1f).setDuration(CARD_FADE_DURATION);
+ mLabel.setAlpha(0f);
+ mLabel.animate().alpha(1f).setDuration(CARD_FADE_DURATION).start();
}
background.startTransition(CARD_FADE_DURATION);
}