summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-08-24 17:44:00 +0800
committerWu-cheng Li <wuchengli@google.com>2011-08-24 17:53:52 +0800
commita321cfdb0803653ba895485f87493290273f26d2 (patch)
treee1d1e57e0c2fb2fa7badfeb245931f7f5f830d55
parentd480002ccad05cf992c628c72884091c36cc654c (diff)
downloadLegacyCamera-a321cfdb0803653ba895485f87493290273f26d2.zip
LegacyCamera-a321cfdb0803653ba895485f87493290273f26d2.tar.gz
LegacyCamera-a321cfdb0803653ba895485f87493290273f26d2.tar.bz2
Dim the background and change the animation of the share popup.
bug:5157438 Change-Id: I177678959698af3c2f6a6236101e0ced6d5b868d
-rw-r--r--res/anim/grow_fade_in_from_top_right.xml30
-rw-r--r--res/anim/shrink_fade_out_from_top_right.xml30
-rw-r--r--res/layout/share_popup.xml3
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/styles.xml4
-rw-r--r--src/com/android/camera/ui/SharePopup.java2
6 files changed, 4 insertions, 66 deletions
diff --git a/res/anim/grow_fade_in_from_top_right.xml b/res/anim/grow_fade_in_from_top_right.xml
deleted file mode 100644
index 1bfede0..0000000
--- a/res/anim/grow_fade_in_from_top_right.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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="100%" android:pivotY="0%"
- 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/shrink_fade_out_from_top_right.xml b/res/anim/shrink_fade_out_from_top_right.xml
deleted file mode 100644
index 9727386..0000000
--- a/res/anim/shrink_fade_out_from_top_right.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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="100%" android:pivotY="0%"
- 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/share_popup.xml b/res/layout/share_popup.xml
index 5e5d2a2..16dab6e 100644
--- a/res/layout/share_popup.xml
+++ b/res/layout/share_popup.xml
@@ -20,7 +20,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:background="@color/dim_background">
<!-- Need a relative layout here because collapse button does not rotate and
it is not in the thumbnail. -->
<RelativeLayout android:id="@+id/root"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 96d269f..f803fba 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -25,4 +25,5 @@
<color name="icon_disabled_color">#DD777777</color>
<color name="time_lapse_arc">#FFC5C5C5</color>
<color name="dark_gray">#151515</color>
+ <color name="dim_background">#80000000</color>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 80d1a56..fdb09dd 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -119,10 +119,6 @@
<item name="android:textSize">16dp</item>
<item name="android:background">@drawable/bg_text_on_preview</item>
</style>
- <style name="AnimationPopup" parent="android:Animation">
- <item name="android:windowEnterAnimation">@anim/grow_fade_in_from_top_right</item>
- <item name="android:windowExitAnimation">@anim/shrink_fade_out_from_top_right</item>
- </style>
<style name="PanoViewHorizontalGrayBar">
<item name="android:background">#444444</item>
<item name="android:alpha">0.5</item>
diff --git a/src/com/android/camera/ui/SharePopup.java b/src/com/android/camera/ui/SharePopup.java
index aa34abf..6bd6aee 100644
--- a/src/com/android/camera/ui/SharePopup.java
+++ b/src/com/android/camera/ui/SharePopup.java
@@ -117,7 +117,7 @@ public class SharePopup extends PopupWindow implements View.OnClickListener,
setContentView(sharePopup);
setOrientation(orientation);
setFocusable(true);
- setAnimationStyle(R.style.AnimationPopup);
+ setAnimationStyle(android.R.style.Animation_Dialog);
initializeLocation(activity, anchor);