summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2014-12-10 18:09:27 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-14 02:10:45 -0800
commit762b4350b731e1c2189c871dc77627df2be87549 (patch)
tree53c044e25c0c270b98bef785a86b74d04a00149d /res
parentee168be7e40e15c1921b32f6b863ad3843c91bfd (diff)
downloadandroid_packages_apps_Snap-762b4350b731e1c2189c871dc77627df2be87549.tar.gz
android_packages_apps_Snap-762b4350b731e1c2189c871dc77627df2be87549.tar.bz2
android_packages_apps_Snap-762b4350b731e1c2189c871dc77627df2be87549.zip
SnapdragonCamera: implement refocus feature
Add a scene mode for refocus. If the latest photo is taken with refocus, user can click on the preview thumbnail, then refocus it by tapping on the photo. Change-Id: I2fd69439467f5a1e33d23d8d239aa3472d88b585
Diffstat (limited to 'res')
-rw-r--r--res/drawable-xxhdpi/ic_refocus_editor_cancel.pngbin0 -> 1744 bytes
-rw-r--r--res/drawable-xxhdpi/ic_refocus_editor_confirm.pngbin0 -> 1566 bytes
-rw-r--r--res/drawable-xxhdpi/ic_scene_mode_refocus.pngbin0 -> 13604 bytes
-rw-r--r--res/layout/refocus_editor.xml68
-rw-r--r--res/raw/camera_click_x5.oggbin0 -> 21306 bytes
-rw-r--r--res/values/arrays.xml3
-rw-r--r--res/values/qcomstrings.xml4
-rw-r--r--res/values/strings.xml4
8 files changed, 78 insertions, 1 deletions
diff --git a/res/drawable-xxhdpi/ic_refocus_editor_cancel.png b/res/drawable-xxhdpi/ic_refocus_editor_cancel.png
new file mode 100644
index 000000000..e58839ddd
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_refocus_editor_cancel.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_refocus_editor_confirm.png b/res/drawable-xxhdpi/ic_refocus_editor_confirm.png
new file mode 100644
index 000000000..9e4dd5e6f
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_refocus_editor_confirm.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_scene_mode_refocus.png b/res/drawable-xxhdpi/ic_scene_mode_refocus.png
new file mode 100644
index 000000000..1bfab604b
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_scene_mode_refocus.png
Binary files differ
diff --git a/res/layout/refocus_editor.xml b/res/layout/refocus_editor.xml
new file mode 100644
index 000000000..c4b42bb4c
--- /dev/null
+++ b/res/layout/refocus_editor.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/refocus_image"
+ android:adjustViewBounds="true"
+ android:scaleType="fitXY"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center" />
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="#80000000">
+
+ <ImageView
+ android:id="@+id/refocus_cancel"
+ android:src="@drawable/ic_refocus_editor_cancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true" />
+ <TextView
+ android:id="@+id/refocus_all"
+ android:text="@string/all_in_focus"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:onClick="allInFocus" />
+ <ImageView
+ android:id="@+id/refocus_done"
+ android:src="@drawable/ic_refocus_editor_confirm"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true" />
+ </RelativeLayout>
+</FrameLayout>
diff --git a/res/raw/camera_click_x5.ogg b/res/raw/camera_click_x5.ogg
new file mode 100644
index 000000000..542432fd7
--- /dev/null
+++ b/res/raw/camera_click_x5.ogg
Binary files differ
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 581146cc6..bb87126b2 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -397,6 +397,7 @@
<!-- Camera Preferences Scene Mode dialog box entries -->
<string-array name="pref_camera_scenemode_entries" translatable="false">
<item>@string/pref_camera_scenemode_entry_auto</item>
+ <item>@string/pref_camera_scenemode_entry_refocus</item>
<!-- <item>@string/pref_camera_scenemode_entry_portrait</item> -->
<item>@string/pref_camera_scenemode_entry_landscape</item>
<item>@string/pref_camera_scenemode_entry_sports</item>
@@ -411,6 +412,7 @@
<array name="scenemode_thumbnails" translatable="false">
<item>@drawable/ic_scene_mode_auto</item>
+ <item>@drawable/ic_scene_mode_refocus</item>
<!-- <item>@drawable/ic_scene_mode_portrait</item> -->
<item>@drawable/ic_scene_mode_landscape</item>
<item>@drawable/ic_scene_mode_sports</item>
@@ -441,6 +443,7 @@
<string-array name="pref_camera_scenemode_entryvalues" translatable="false">
<item>auto</item>
+ <item>@string/pref_camera_advanced_feature_value_refocus_on</item>
<!-- <item>portrait</item> -->
<item>landscape</item>
<item>sports</item>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 77a905ae3..6ba2af63f 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -1,5 +1,5 @@
<!--
- Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
Not a Contribution.
@@ -865,5 +865,7 @@
<!-- The alas of CameraActivity for gesture operation -->
<string name="camera_gesture_title">Launch camera</string>
+
+ <string name="all_in_focus">All in Focus</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0ad549a41..33597b74b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -396,6 +396,8 @@
<string name="pref_camera_scenemode_entry_sunset">Sunset</string>
<!-- Scene mode optimized for taking indoor low-lights pictures. [CHAR LIMIT=16] -->
<string name="pref_camera_scenemode_entry_party">Party</string>
+ <!-- Scene mode for refocus feature [CHAR LIMIT=16] -->
+ <string name="pref_camera_scenemode_entry_refocus">Macro+</string>
<!-- Settings menu, scene mode labels [CHAR LIMIT=50] -->
<string name="pref_camera_scenemode_label_auto">NONE</string>
@@ -714,4 +716,6 @@ CHAR LIMIT = NONE] -->
<string name="pref_camera_video_rotation_label_270">270</string>
<string name="remaining_photos_format">%d left</string>
+
+ <string name="refocus_toast">To re-focus last photo, tap here</string>
</resources>