summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/AbstractIndicatorButton.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/ui/AbstractIndicatorButton.java')
-rw-r--r--src/com/android/camera/ui/AbstractIndicatorButton.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/AbstractIndicatorButton.java b/src/com/android/camera/ui/AbstractIndicatorButton.java
index 6f7a656..efed757 100644
--- a/src/com/android/camera/ui/AbstractIndicatorButton.java
+++ b/src/com/android/camera/ui/AbstractIndicatorButton.java
@@ -26,7 +26,7 @@ import android.view.animation.AnimationUtils;
import android.widget.ImageView;
// This is an indicator button and pressing it opens a popup window. Ex: flash or other settings.
-public abstract class AbstractIndicatorButton extends ImageView {
+public abstract class AbstractIndicatorButton extends RotateImageView {
private final String TAG = "AbstractIndicatorButton";
protected Context mContext;
protected Animation mFadeIn, mFadeOut;
@@ -87,11 +87,18 @@ public abstract class AbstractIndicatorButton extends ImageView {
}
}
+ @Override
+ public void setDegree(int degree) {
+ super.setDegree(degree);
+ if (mPopup != null) mPopup.setRotation(-degree);
+ }
+
abstract protected void initializePopup();
private void showPopup() {
if (mPopup == null) initializePopup();
+ mPopup.setRotation(-getDegree());
mPopup.clearAnimation();
mPopup.startAnimation(mFadeIn);
mPopup.setVisibility(View.VISIBLE);