Merge "Fix several UI bugs." into ics-mr1
diff --git a/res/anim/grow_fade_in_from_right.xml b/res/anim-sw600dp/setting_popup_grow_fade_in.xml
similarity index 100%
rename from res/anim/grow_fade_in_from_right.xml
rename to 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
similarity index 100%
rename from res/anim/shrink_fade_out_from_right.xml
rename to 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 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);