summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2012-12-18 12:27:34 -0800
committerDoris Liu <tianliu@google.com>2013-01-10 19:42:53 -0800
commit54d2fafcbb85025ea737c56af6df2afbf4bfda96 (patch)
tree2e3e471eb87be5f07b130916d462ce0817ac0626 /res
parent33f618d2d3a6ad5fb5bb8119d8c57ec78042de4c (diff)
downloadCamera-54d2fafcbb85025ea737c56af6df2afbf4bfda96.tar.gz
Count down timer for taking a picture
Bug: 7892752 Change-Id: I4334621c8bd4ecc7514f627381d14b68fef49cba
Diffstat (limited to 'res')
-rw-r--r--res/anim/count_down_exit.xml29
-rw-r--r--res/layout-land/photo_module_content.xml (renamed from res/layout-land/photo_module.xml)2
-rw-r--r--res/layout-port/photo_module_content.xml (renamed from res/layout-port/photo_module.xml)2
-rw-r--r--res/layout/count_down_to_capture.xml35
-rw-r--r--res/layout/photo_module.xml29
-rw-r--r--res/layout/timer_setting_popup.xml98
-rw-r--r--res/raw/beep_once.oggbin0 -> 10452 bytes
-rw-r--r--res/raw/beep_twice.oggbin0 -> 9627 bytes
-rw-r--r--res/values/strings.xml18
-rw-r--r--res/xml/camera_preferences.xml4
10 files changed, 214 insertions, 3 deletions
diff --git a/res/anim/count_down_exit.xml b/res/anim/count_down_exit.xml
new file mode 100644
index 00000000..0091c5bd
--- /dev/null
+++ b/res/anim/count_down_exit.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2013, 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">
+ <alpha
+ android:fromAlpha="1.0"
+ android:toAlpha="0.0"
+ android:duration="1000" />
+ <scale
+ android:fromXScale="1.0"
+ android:fromYScale="1.0"
+ android:toXScale="3.0"
+ android:toYScale="3.0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:duration="800" />
+</set> \ No newline at end of file
diff --git a/res/layout-land/photo_module.xml b/res/layout-land/photo_module_content.xml
index beeaba4d..2afcf408 100644
--- a/res/layout-land/photo_module.xml
+++ b/res/layout-land/photo_module_content.xml
@@ -15,7 +15,7 @@
-->
<!-- This layout is shared by phone and tablet in landscape orientation. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/camera_app_root"
+ android:id="@+id/camera_app"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/res/layout-port/photo_module.xml b/res/layout-port/photo_module_content.xml
index f8636d73..79438a5d 100644
--- a/res/layout-port/photo_module.xml
+++ b/res/layout-port/photo_module_content.xml
@@ -15,7 +15,7 @@
-->
<!-- This layout is shared by phone and tablet in landscape orientation. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/camera_app_root"
+ android:id="@+id/camera_app"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/res/layout/count_down_to_capture.xml b/res/layout/count_down_to_capture.xml
new file mode 100644
index 00000000..68276ad4
--- /dev/null
+++ b/res/layout/count_down_to_capture.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<com.android.camera.ui.CountDownView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/count_down_to_capture"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="invisible" >
+ <TextView android:id="@+id/remaining_seconds"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:textSize="160sp"
+ android:textColor="@android:color/white"
+ android:gravity="center" />
+ <TextView android:id="@+id/count_down_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="10dp"
+ android:paddingTop="20dp"
+ android:textSize="20sp"
+ android:textColor="@android:color/white"
+ android:text="@string/count_down_title_text" />
+</com.android.camera.ui.CountDownView> \ No newline at end of file
diff --git a/res/layout/photo_module.xml b/res/layout/photo_module.xml
new file mode 100644
index 00000000..b2ad7028
--- /dev/null
+++ b/res/layout/photo_module.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<!-- This layout is shared by phone and tablet in both landscape and portrait
+ orientation. The purpose of having this layout is to eventually not manually
+ recreate views when the orientation changes, by migrating the views that do not
+ need to be recreated in onConfigurationChanged from old photo_module to this
+ layout. -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/camera_app_root"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <include layout="@layout/count_down_to_capture"/>
+ <include layout="@layout/photo_module_content"/>
+</FrameLayout> \ No newline at end of file
diff --git a/res/layout/timer_setting_popup.xml b/res/layout/timer_setting_popup.xml
new file mode 100644
index 00000000..8d0810c6
--- /dev/null
+++ b/res/layout/timer_setting_popup.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2013, 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.
+-->
+
+<com.android.camera.ui.TimerSettingPopup xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/SettingPopupWindow">
+
+ <LinearLayout android:orientation="vertical"
+ android:background="@color/popup_background"
+ android:layout_height="wrap_content"
+ android:layout_width="@dimen/big_setting_popup_window_width">
+
+ <LinearLayout android:orientation="horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent">
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/popup_title_frame_min_height"
+ android:gravity="center_vertical"
+ style="@style/PopupTitleText" />
+ <Switch
+ android:id="@+id/timer_setting_switch"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginRight="8dp"
+ android:layout_gravity="right|center_vertical" />
+ </LinearLayout>
+
+ <View style="@style/PopupTitleSeparator" />
+
+ <TextView
+ android:id="@+id/set_timer_help_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="16dip"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:paddingBottom="16dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/set_timer_help"/>
+
+ <LinearLayout
+ android:id="@+id/time_duration_picker"
+ android:orientation="vertical"
+ android:layout_gravity="center_horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent">
+ <TextView
+ android:id="@+id/set_time_interval_title"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingTop="5dip"
+ android:gravity="center"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/set_duration"/>
+ <!-- A number picker to set timer -->
+ <NumberPicker
+ android:id="@+id/duration"
+ android:layout_width="160dp"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dip"
+ android:layout_marginRight="16dip"
+ android:layout_gravity="center_horizontal"
+ android:focusable="false" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:divider="?android:attr/dividerHorizontal"
+ android:showDividers="beginning"
+ android:dividerPadding="0dip">
+ <Button android:id="@+id/timer_set_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ style="?android:attr/buttonBarButtonStyle"
+ android:text="@string/time_lapse_interval_set" />
+ </LinearLayout>
+ </LinearLayout>
+
+</com.android.camera.ui.TimerSettingPopup>
diff --git a/res/raw/beep_once.ogg b/res/raw/beep_once.ogg
new file mode 100644
index 00000000..6d649171
--- /dev/null
+++ b/res/raw/beep_once.ogg
Binary files differ
diff --git a/res/raw/beep_twice.ogg b/res/raw/beep_twice.ogg
new file mode 100644
index 00000000..95c5b7ef
--- /dev/null
+++ b/res/raw/beep_twice.ogg
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6ffa24a6..5371619c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -73,6 +73,16 @@
<string name="pref_camera_recordlocation_default" translatable="false">none</string>
+ <!-- Title for countdown timer on camera settings screen [CHAR LIMIT=30]-->
+ <string name="pref_camera_timer_title">Countdown timer</string>
+
+ <string name="pref_camera_timer_default" translatable="false">0</string>
+ <!-- Entry for countdown timer setting. e.g. 1 second, 10 seconds, etc. [CHAR LIMIT=30]-->
+ <plurals name="pref_camera_timer_entry">
+ <item quantity="one">1 second</item>
+ <item quantity="other">%d seconds</item>
+ </plurals>
+
<!-- Entry of a on/off setting. The setting is turned off. [CHAR LIMIT=15] -->
<string name="setting_off">Off</string>
<!-- Entry of a on/off setting. The setting is turned on. [CHAR LIMIT=15] -->
@@ -432,7 +442,13 @@ CHAR LIMIT = NONE] -->
<!-- Title in time interval picker for setting time interval. [CHAR LIMIT = 30]-->
<string name="set_time_interval">Set Time Interval</string>
<!-- Help text that is shown when the time lapse feature is turned off. [CHAR LIMIT = 180]-->
- <string name="set_time_interval_help">Time lapse feature is off. Turn it on to set time interval."</string>
+ <string name="set_time_interval_help">Time lapse feature is off. Turn it on to set time interval.</string>
+ <!-- Help text that is shown when the countdown timer is turned off. [CHAR LIMIT = 180]-->
+ <string name="set_timer_help">Countdown timer is off. Turn it on to count down before taking a picture.</string>
+ <!-- Title in timer setting for setting the duration for the countdown timer. [CHAR LIMIT = 50]-->
+ <string name="set_duration">Set duration in seconds</string>
+ <!-- On-screen hint during timer countdown for taking a photo. [CHAR LIMIT = 60]-->
+ <string name="count_down_title_text">Counting down to take a photo</string>
<!-- Title for first run dialog asking if the user wants to remember photo locations [CHAR LIMIT = 50] -->
<string name="remember_location_title">Remember photo locations?</string>
diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml
index 729ade3c..cfe2fd79 100644
--- a/res/xml/camera_preferences.xml
+++ b/res/xml/camera_preferences.xml
@@ -77,4 +77,8 @@
camera:title="@string/pref_camera_scenemode_entry_hdr"
camera:entries="@array/pref_camera_hdr_entries"
camera:entryValues="@array/pref_camera_hdr_entryvalues" />
+ <CountDownTimerPreference
+ camera:key="pref_camera_timer_key"
+ camera:defaultValue="@string/pref_camera_timer_default"
+ camera:title="@string/pref_camera_timer_title"/>
</PreferenceGroup>