summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-09-07 08:10:55 +0800
committerAngus Kong <shkong@google.com>2011-09-08 07:10:14 +0800
commit2f9ed6f52580b8fecb77ec3ca123a804eea89f8c (patch)
tree5a7dd7a9a482114af3eee39c91937d6212f21247 /res
parent2670b3d7c318604f07b680b22360d349103144be (diff)
downloadLegacyCamera-2f9ed6f52580b8fecb77ec3ca123a804eea89f8c.zip
LegacyCamera-2f9ed6f52580b8fecb77ec3ca123a804eea89f8c.tar.gz
LegacyCamera-2f9ed6f52580b8fecb77ec3ca123a804eea89f8c.tar.bz2
A customized dialog for preparing low-res review.
According to UI spec, a customized dialog is needed. The customized dialog has a rounded rectangle as a background and a spinner over a text view. bug:5244268 Change-Id: I21a5709babbaf92e507c8900a8cfb322e29bae4c
Diffstat (limited to 'res')
-rw-r--r--res/anim/fade_in_quick.xml22
-rw-r--r--res/anim/fade_out_quick.xml22
-rw-r--r--res/drawable/pano_rounded_rectangle.xml26
-rw-r--r--res/layout/pano_capture.xml2
-rw-r--r--res/layout/pano_dialog_view.xml53
-rw-r--r--res/values-w1024dp/dimens.xml7
-rw-r--r--res/values-w1024dp/styles.xml3
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/dimens.xml7
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/values/styles.xml3
11 files changed, 143 insertions, 5 deletions
diff --git a/res/anim/fade_in_quick.xml b/res/anim/fade_in_quick.xml
new file mode 100644
index 0000000..80d827d
--- /dev/null
+++ b/res/anim/fade_in_quick.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:propertyName="alpha"
+ android:duration="200"
+ android:valueFrom="0.0"
+ android:valueTo="1.0"
+ android:valueType="floatType"/>
diff --git a/res/anim/fade_out_quick.xml b/res/anim/fade_out_quick.xml
new file mode 100644
index 0000000..9659c4b
--- /dev/null
+++ b/res/anim/fade_out_quick.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:propertyName="alpha"
+ android:duration="200"
+ android:valueFrom="1.0"
+ android:valueTo="0.0"
+ android:valueType="floatType" />
diff --git a/res/drawable/pano_rounded_rectangle.xml b/res/drawable/pano_rounded_rectangle.xml
new file mode 100644
index 0000000..2cbdbc3
--- /dev/null
+++ b/res/drawable/pano_rounded_rectangle.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+
+ <corners android:radius="@dimen/pano_custom_dialog_corner_radius" />
+
+ <size android:width="@dimen/pano_custom_dialog_width"
+ android:height="@dimen/pano_custom_dialog_height" />
+
+ <solid android:color="@color/pano_custom_dialog_background" />
+</shape>
diff --git a/res/layout/pano_capture.xml b/res/layout/pano_capture.xml
index a271d23..7cf6c01 100644
--- a/res/layout/pano_capture.xml
+++ b/res/layout/pano_capture.xml
@@ -60,4 +60,6 @@
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_centerInParent="true" />
+
+ <include layout="@layout/pano_dialog_view" />
</RelativeLayout>
diff --git a/res/layout/pano_dialog_view.xml b/res/layout/pano_dialog_view.xml
new file mode 100644
index 0000000..288d00f
--- /dev/null
+++ b/res/layout/pano_dialog_view.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pano_preview_progress_dialog"
+ android:visibility="gone"
+ android:background="#AA000000"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/pano_custom_dialog_background"
+ android:src="@drawable/pano_rounded_rectangle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true" />
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true">
+
+ <ProgressBar
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/pano_custom_dialog_spinner_height"
+ android:layout_gravity="center_horizontal" />
+
+ <TextView
+ style="@style/PanoCustomDialogText"
+ android:id="@+id/pano_custom_dialog_text_view"
+ android:text="@string/pano_dialog_prepare_preview"
+ android:paddingTop="15dp"
+ android:editable="false"
+ android:gravity="center"
+ android:layout_gravity="center_horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+</RelativeLayout>
diff --git a/res/values-w1024dp/dimens.xml b/res/values-w1024dp/dimens.xml
index 977c770..1ca3218 100644
--- a/res/values-w1024dp/dimens.xml
+++ b/res/values-w1024dp/dimens.xml
@@ -30,13 +30,16 @@
<dimen name="pano_control_start_button_size">180dp</dimen>
<dimen name="pano_mosaic_surface_width">960dp</dimen>
<dimen name="pano_mosaic_surface_height">360dp</dimen>
- <dimen name="pano_capture_stop_button_width">160dp</dimen>
- <dimen name="pano_capture_stop_button_height">160dp</dimen>
<dimen name="pano_review_button_width">180dp</dimen>
<dimen name="pano_review_button_height">180dp</dimen>
<dimen name="pano_capture_too_fast_text_height">160dp</dimen>
<dimen name="pano_indication_width">300dp</dimen>
<dimen name="pano_indication_height">150dp</dimen>
+ <dimen name="pano_custom_dialog_corner_radius">24dp</dimen>
+ <dimen name="pano_custom_dialog_width">580dp</dimen>
+ <dimen name="pano_custom_dialog_height">200dp</dimen>
+ <dimen name="pano_custom_dialog_textview_top_padding">30dp</dimen>
+ <dimen name="pano_custom_dialog_spinner_height">70dp</dimen>
<dimen name="setting_row_height">48dp</dimen>
<dimen name="setting_item_text_size">21dp</dimen>
<dimen name="setting_knob_width">72dp</dimen>
diff --git a/res/values-w1024dp/styles.xml b/res/values-w1024dp/styles.xml
index 00016b5..e5da857 100644
--- a/res/values-w1024dp/styles.xml
+++ b/res/values-w1024dp/styles.xml
@@ -45,4 +45,7 @@
<item name="android:layout_alignParentRight">true</item>
<item name="android:visibility">gone</item>
</style>
+ <style name="PanoCustomDialogText">
+ <item name="android:textAppearance">@android:style/TextAppearance.Large</item>
+ </style>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a0bbf7f..7d5081f 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -28,4 +28,5 @@
<color name="share_popup_background">#B0000000</color>
<color name="share_icon_background">#40000000</color>
<color name="indicator_background">#40000000</color>
+ <color name="pano_custom_dialog_background">#FF666666</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 63bb9b3..b1e3db4 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -26,13 +26,16 @@
<dimen name="pano_control_start_button_size">70dp</dimen>
<dimen name="pano_mosaic_surface_width">640dp</dimen>
<dimen name="pano_mosaic_surface_height">240dp</dimen>
- <dimen name="pano_capture_stop_button_width">70dp</dimen>
- <dimen name="pano_capture_stop_button_height">70dp</dimen>
<dimen name="pano_review_button_width">70dp</dimen>
<dimen name="pano_review_button_height">70dp</dimen>
<dimen name="pano_capture_too_fast_text_height">70dp</dimen>
<dimen name="pano_indication_width">150dp</dimen>
<dimen name="pano_indication_height">75dp</dimen>
+ <dimen name="pano_custom_dialog_corner_radius">15dp</dimen>
+ <dimen name="pano_custom_dialog_width">320dp</dimen>
+ <dimen name="pano_custom_dialog_height">120dp</dimen>
+ <dimen name="pano_custom_dialog_textview_top_padding">15dp</dimen>
+ <dimen name="pano_custom_dialog_spinner_height">40dp</dimen>
<dimen name="setting_row_height">42dp</dimen>
<dimen name="setting_item_text_size">16dp</dimen>
<dimen name="setting_knob_width">36dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d1ec27a..8cf4662 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -272,7 +272,7 @@
<string name="pano_too_fast_prompt">Too Fast</string>
<!-- The text shown in the progress dialog when panorama preview is generating in the background [CHAR LIMIT=30] -->
- <string name="pano_dialog_prepare_preview">Preparing preview...</string>
+ <string name="pano_dialog_prepare_preview">Preparing panorama</string>
<!-- The text shown in the progress dialog when generating the final panorama result in the background [CHAR LIMIT=30] -->
<string name="pano_dialog_generate_panorama">Generating panorama...</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index eb7d30f..9e2046b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -155,6 +155,9 @@
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">0.5</item>
</style>
+ <style name="PanoCustomDialogText">
+ <item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
+ </style>
<style name="ReviewThumbnail">
<item name="android:layout_width">52dp</item>
<item name="android:layout_height">52dp</item>