summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChung-yih Wang <cywang@google.com>2011-11-10 14:00:40 +0800
committerChung-yih Wang <cywang@google.com>2011-11-14 16:05:00 +0800
commit006baced4746ddaf31fbd170bcb76abc5f1f8325 (patch)
tree8bc2e96bf777b41079b701f1cf8b806276948fce
parent8d51fc281ca4e14c87eac278d153e162c0e1fcf2 (diff)
downloadLegacyCamera-006baced4746ddaf31fbd170bcb76abc5f1f8325.zip
LegacyCamera-006baced4746ddaf31fbd170bcb76abc5f1f8325.tar.gz
LegacyCamera-006baced4746ddaf31fbd170bcb76abc5f1f8325.tar.bz2
Fix several UI bugs.
bug:5575970 1. The cancel button of the background replacer message should be on the bottom. 2. The location of recording timer was too low in the landscape mode. 3. Fix the animation of the setting popup. Change-Id: Ia2345e72efc0118cd0172af4bd6243815c602493
-rw-r--r--res/anim-sw600dp/setting_popup_grow_fade_in.xml (renamed from res/anim/grow_fade_in_from_right.xml)0
-rw-r--r--res/anim-sw600dp/setting_popup_shrink_fade_out.xml (renamed from res/anim/shrink_fade_out_from_right.xml)0
-rw-r--r--res/anim/setting_popup_grow_fade_in.xml30
-rw-r--r--res/anim/setting_popup_shrink_fade_out.xml30
-rw-r--r--res/layout/bg_replacement_training_message.xml10
-rw-r--r--res/values-sw600dp/styles.xml5
-rw-r--r--res/values/styles.xml4
-rw-r--r--src/com/android/camera/ui/AbstractIndicatorButton.java4
8 files changed, 74 insertions, 9 deletions
diff --git a/res/anim/grow_fade_in_from_right.xml b/res/anim-sw600dp/setting_popup_grow_fade_in.xml
index 3c7ff01..3c7ff01 100644
--- a/res/anim/grow_fade_in_from_right.xml
+++ b/res/anim-sw600dp/setting_popup_grow_fade_in.xml
diff --git a/res/anim/shrink_fade_out_from_right.xml b/res/anim-sw600dp/setting_popup_shrink_fade_out.xml
index dd6c43e..dd6c43e 100644
--- a/res/anim/shrink_fade_out_from_right.xml
+++ b/res/anim-sw600dp/setting_popup_shrink_fade_out.xml
diff --git a/res/anim/setting_popup_grow_fade_in.xml b/res/anim/setting_popup_grow_fade_in.xml
new file mode 100644
index 0000000..32f37c4
--- /dev/null
+++ b/res/anim/setting_popup_grow_fade_in.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/fade_in.xml
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@android:interpolator/decelerate_quint"
+ android:fromXScale="0.9" android:toXScale="1.0"
+ android:fromYScale="0.9" android:toYScale="1.0"
+ android:pivotX="50%" android:pivotY="100%"
+ android:duration="300" />
+ <alpha android:interpolator="@android:interpolator/decelerate_cubic"
+ android:fromAlpha="0.5" android:toAlpha="1.0"
+ android:duration="300" />
+</set>
diff --git a/res/anim/setting_popup_shrink_fade_out.xml b/res/anim/setting_popup_shrink_fade_out.xml
new file mode 100644
index 0000000..8b35b1b
--- /dev/null
+++ b/res/anim/setting_popup_shrink_fade_out.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/fade_out.xml
+**
+** Copyright 2007, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
+ <scale android:interpolator="@android:interpolator/decelerate_quint"
+ android:fromXScale="1.0" android:toXScale="0.9"
+ android:fromYScale="1.0" android:toYScale="0.9"
+ android:pivotX="50%" android:pivotY="100%"
+ android:duration="300" />
+ <alpha android:interpolator="@android:interpolator/decelerate_cubic"
+ android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:duration="300" />
+</set>
diff --git a/res/layout/bg_replacement_training_message.xml b/res/layout/bg_replacement_training_message.xml
index 449e8df..3bef83e 100644
--- a/res/layout/bg_replacement_training_message.xml
+++ b/res/layout/bg_replacement_training_message.xml
@@ -29,7 +29,7 @@
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:orientation="horizontal"
+ android:orientation="vertical"
android:background="@drawable/dialog_full_holo_dark">
<TextView
android:layout_width="wrap_content"
@@ -39,13 +39,13 @@
android:padding="32dp" />
<View
- android:layout_height="match_parent"
- android:layout_width="1px"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
android:background="#aaaaaa" />
<Button android:id="@+id/bg_replace_cancel_button"
- android:layout_height="match_parent"
- android:layout_width="48dip"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
android:layout_gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
style="?android:attr/borderlessButtonStyle"
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 6b7427f..0f29321 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -83,4 +83,9 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
</style>
+ <style name="ViewfinderLableLayout">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_margin">13dp</item>
+ </style>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index e60b2a7..204a650 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -151,9 +151,9 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_marginTop">13dp</item>
- <item name="android:layout_marginBottom">13dp</item>
+ <item name="android:layout_marginBottom">@dimen/indicator_bar_width</item>
<item name="android:layout_marginLeft">13dp</item>
- <item name="android:layout_marginRight">@dimen/indicator_bar_width</item>
+ <item name="android:layout_marginRight">13dp</item>
</style>
<style name="OnViewfinderLabel">
<item name="android:gravity">center</item>
diff --git a/src/com/android/camera/ui/AbstractIndicatorButton.java b/src/com/android/camera/ui/AbstractIndicatorButton.java
index 362becf..fd0f664 100644
--- a/src/com/android/camera/ui/AbstractIndicatorButton.java
+++ b/src/com/android/camera/ui/AbstractIndicatorButton.java
@@ -44,8 +44,8 @@ public abstract class AbstractIndicatorButton extends RotateImageView implements
public AbstractIndicatorButton(Context context) {
super(context);
- mFadeIn = AnimationUtils.loadAnimation(context, R.anim.grow_fade_in_from_right);
- mFadeOut = AnimationUtils.loadAnimation(context, R.anim.shrink_fade_out_from_right);
+ mFadeIn = AnimationUtils.loadAnimation(context, R.anim.setting_popup_grow_fade_in);
+ mFadeOut = AnimationUtils.loadAnimation(context, R.anim.setting_popup_shrink_fade_out);
HIGHLIGHT_COLOR = context.getResources().getColor(R.color.review_control_pressed_color);
setScaleType(ImageView.ScaleType.CENTER);
PopupManager.getInstance(context).setOnOtherPopupShowedListener(this);