diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-02-25 13:54:45 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-02-25 13:54:45 -0800 |
commit | e5583a329828f686734844de89b16c08b588a6f5 (patch) | |
tree | 557d08f2b4b573b46f661dda96d1e728e865518d /src | |
parent | 056e03910f30e0c5b359159bedd65f05855e3c6b (diff) | |
parent | 1ce2883603bd1e98a487cb40577fbba281282aca (diff) | |
download | android_packages_apps_Snap-e5583a329828f686734844de89b16c08b588a6f5.tar.gz android_packages_apps_Snap-e5583a329828f686734844de89b16c08b588a6f5.tar.bz2 android_packages_apps_Snap-e5583a329828f686734844de89b16c08b588a6f5.zip |
Merge "SnapdragonCamera: don't hide count down title"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/ui/CountDownView.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/com/android/camera/ui/CountDownView.java b/src/com/android/camera/ui/CountDownView.java index f6d163624..c8d7174b1 100644 --- a/src/com/android/camera/ui/CountDownView.java +++ b/src/com/android/camera/ui/CountDownView.java @@ -150,10 +150,23 @@ public class CountDownView extends FrameLayout { public void setOrientation(int orientation) { mRemainingSecondsView.setRotation(-orientation); - if (orientation == 0) { - mCountDownTitle.setVisibility(View.VISIBLE); - } else { - mCountDownTitle.setVisibility(View.GONE); + + mCountDownTitle.setRotation(-orientation); + int dx = 0, dy = 0; + switch (orientation) { + case 90: + dy = (mCountDownTitle.getWidth() - mCountDownTitle.getHeight()) / 2; + dx = -dy; + break; + case 270: + dx = dy = (mCountDownTitle.getWidth() - mCountDownTitle.getHeight()) / 2; + break; + case 180: + break; + default: + break; } + mCountDownTitle.setTranslationX(dx); + mCountDownTitle.setTranslationY(dy); } } |