summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPin Ting <pinting@google.com>2012-05-22 09:03:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-22 09:03:19 -0700
commit8d652860538ad9a59b3a54a13e286dfd99c17caa (patch)
treed2189eeb21912dec32e765642c22161720cce202 /src
parent69703dd35d382042ee840cf492f03daf3f348fa3 (diff)
parent1d7300d8b5637a5c538ce6dbc66d4dee141d43e8 (diff)
downloadCamera-8d652860538ad9a59b3a54a13e286dfd99c17caa.tar.gz
Merge "Fix the mode picker animation position and speed in landscape." into jb-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ModePicker.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/camera/ModePicker.java b/src/com/android/camera/ModePicker.java
index a785c9d9..003f94c7 100644
--- a/src/com/android/camera/ModePicker.java
+++ b/src/com/android/camera/ModePicker.java
@@ -127,7 +127,7 @@ public class ModePicker extends RelativeLayout implements View.OnClickListener,
// It looks weird so fade-in animation is not used here.
mCurrentModeFrame.setVisibility(View.VISIBLE);
} else {
- Util.fadeIn(mCurrentModeFrame, 0.3F, 1F, 400);
+ Util.fadeIn(mCurrentModeFrame, 0.3F, 1F, 100);
}
mModeSelectionFrame.setVisibility(View.GONE);
changeToSelectedMode();
@@ -145,10 +145,15 @@ public class ModePicker extends RelativeLayout implements View.OnClickListener,
private void enableModeSelection(boolean enabled) {
if (mCurrentModeFrame != null) {
mSelectionEnabled = enabled;
- // Animation Effect is applied on Phone UI only.
+ // Animation is applied on Phone UI only.
+ mModeSelectionFrame.clearAnimation();
mModeSelectionFrame.startAnimation(enabled ? mFadeIn : mFadeOut);
if (enabled) {
mModeSelectionFrame.setVisibility(View.VISIBLE);
+ // Make sure the animation is stopped. It looks like the view
+ // will still be drawn during animation even though the
+ // visibility has been set to gone.
+ mCurrentModeFrame.clearAnimation();
mCurrentModeFrame.setVisibility(View.GONE);
}
}