diff options
author | weijiew <weijiew@codeaurora.org> | 2016-12-02 19:56:28 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-05 19:04:51 -0800 |
commit | b39e01c54b0d46b8a005e48e88537bc875b4977b (patch) | |
tree | 57cdbafc165c847e6cb8826c3e591d18230c1290 /res | |
parent | 1faccedafea1dfd535261d5935e457ba353296ef (diff) | |
download | android_packages_apps_Snap-b39e01c54b0d46b8a005e48e88537bc875b4977b.tar.gz android_packages_apps_Snap-b39e01c54b0d46b8a005e48e88537bc875b4977b.tar.bz2 android_packages_apps_Snap-b39e01c54b0d46b8a005e48e88537bc875b4977b.zip |
SnapdragonCamera: Show label and dialog when switch to new scene mode
Show label and instructional dialog when switch to new scene mode
Change-Id: I75becaa9bb898ca9ef68c94b1195069131745f14
CRs-Fixed: 1091210
Diffstat (limited to 'res')
31 files changed, 251 insertions, 0 deletions
diff --git a/res/drawable-hdpi/ic_scene_mode_black_auto.png b/res/drawable-hdpi/ic_scene_mode_black_auto.png Binary files differnew file mode 100644 index 000000000..3f68e8e47 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_auto.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_backlight.png b/res/drawable-hdpi/ic_scene_mode_black_backlight.png Binary files differnew file mode 100644 index 000000000..a70502f79 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_backlight.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_beach.png b/res/drawable-hdpi/ic_scene_mode_black_beach.png Binary files differnew file mode 100644 index 000000000..d66a5ff23 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_beach.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_best_photo.png b/res/drawable-hdpi/ic_scene_mode_black_best_photo.png Binary files differnew file mode 100644 index 000000000..5ddd1aac2 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_best_photo.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_blur_buster.png b/res/drawable-hdpi/ic_scene_mode_black_blur_buster.png Binary files differnew file mode 100644 index 000000000..a5b930f5e --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_blur_buster.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_candlelight.png b/res/drawable-hdpi/ic_scene_mode_black_candlelight.png Binary files differnew file mode 100644 index 000000000..cc8606e09 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_candlelight.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_chroma_flash.png b/res/drawable-hdpi/ic_scene_mode_black_chroma_flash.png Binary files differnew file mode 100644 index 000000000..9c8c1108e --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_chroma_flash.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_dual_camera.png b/res/drawable-hdpi/ic_scene_mode_black_dual_camera.png Binary files differnew file mode 100644 index 000000000..16b803601 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_dual_camera.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_flowers.png b/res/drawable-hdpi/ic_scene_mode_black_flowers.png Binary files differnew file mode 100644 index 000000000..527329e75 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_flowers.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_hdr.png b/res/drawable-hdpi/ic_scene_mode_black_hdr.png Binary files differnew file mode 100644 index 000000000..3baa45485 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_hdr.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_landscape.png b/res/drawable-hdpi/ic_scene_mode_black_landscape.png Binary files differnew file mode 100644 index 000000000..45a247e8d --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_landscape.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_night.png b/res/drawable-hdpi/ic_scene_mode_black_night.png Binary files differnew file mode 100644 index 000000000..6cf2ce8eb --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_night.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_optizoom.png b/res/drawable-hdpi/ic_scene_mode_black_optizoom.png Binary files differnew file mode 100644 index 000000000..331705738 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_optizoom.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_panorama.png b/res/drawable-hdpi/ic_scene_mode_black_panorama.png Binary files differnew file mode 100644 index 000000000..38c4a1b39 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_panorama.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_portrait.png b/res/drawable-hdpi/ic_scene_mode_black_portrait.png Binary files differnew file mode 100644 index 000000000..564e3da51 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_portrait.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_pro_mode.png b/res/drawable-hdpi/ic_scene_mode_black_pro_mode.png Binary files differnew file mode 100644 index 000000000..bb9cd76ac --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_pro_mode.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_sharp_photo.png b/res/drawable-hdpi/ic_scene_mode_black_sharp_photo.png Binary files differnew file mode 100644 index 000000000..a475cc724 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_sharp_photo.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_snow.png b/res/drawable-hdpi/ic_scene_mode_black_snow.png Binary files differnew file mode 100644 index 000000000..2ac492c08 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_snow.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_sports.png b/res/drawable-hdpi/ic_scene_mode_black_sports.png Binary files differnew file mode 100644 index 000000000..932be9821 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_sports.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_sunset.png b/res/drawable-hdpi/ic_scene_mode_black_sunset.png Binary files differnew file mode 100644 index 000000000..68b653527 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_sunset.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_time_lapse.png b/res/drawable-hdpi/ic_scene_mode_black_time_lapse.png Binary files differnew file mode 100644 index 000000000..868e51d3d --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_time_lapse.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_tracking_focus.png b/res/drawable-hdpi/ic_scene_mode_black_tracking_focus.png Binary files differnew file mode 100644 index 000000000..e86a330c2 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_tracking_focus.png diff --git a/res/drawable-hdpi/ic_scene_mode_black_ubifocus.png b/res/drawable-hdpi/ic_scene_mode_black_ubifocus.png Binary files differnew file mode 100644 index 000000000..eb174e728 --- /dev/null +++ b/res/drawable-hdpi/ic_scene_mode_black_ubifocus.png diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml index fc05fd0ca..affb6b081 100644 --- a/res/layout/capture_module.xml +++ b/res/layout/capture_module.xml @@ -93,6 +93,9 @@ </com.android.camera.ui.RotateLayout> <include + layout="@layout/scene_mode_label"/> + + <include style="@style/CameraControls" layout="@layout/one_ui_layout" android:layout_gravity="center" /> diff --git a/res/layout/pano_capture_module.xml b/res/layout/pano_capture_module.xml index e382570ef..c8809af37 100644 --- a/res/layout/pano_capture_module.xml +++ b/res/layout/pano_capture_module.xml @@ -34,6 +34,10 @@ android:id="@+id/preview_process_view" android:layout_width="match_parent" android:layout_height="match_parent"/> + + <include + layout="@layout/scene_mode_label"/> + <include style="@style/CameraControls" layout="@layout/camera_controls" diff --git a/res/layout/scene_mode_instructional.xml b/res/layout/scene_mode_instructional.xml new file mode 100644 index 000000000..588dc3549 --- /dev/null +++ b/res/layout/scene_mode_instructional.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Copyright (c) 2016, 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. + --> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/mode_layout_rect" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/transparent" + android:gravity="center"> + + <LinearLayout + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="30dp" + android:layout_marginTop="15dp" + android:orientation="horizontal" + android:gravity="center"> + <ImageView + android:id="@+id/scene_mode_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/chroma_flash"/> + <TextView + android:id="@+id/scene_mode_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_toRightOf="@id/scene_mode_icon" + android:text="@string/pref_camera_scenemode_entry_chromaflash" + android:textColor="@android:color/black" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + </LinearLayout> + + <TextView + android:id="@+id/scene_mode_instructional" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="15dp" + android:layout_marginLeft="30dp" + android:layout_marginRight="30dp" + android:text="@string/pref_camera2_scene_mode_chroma_flash_instructional_content" + android:textColor="@android:color/black" + android:layout_below="@id/title" /> + <CheckBox + android:id="@+id/remember_selected" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="15dp" + android:layout_marginLeft="30dp" + android:layout_below="@id/scene_mode_instructional" + android:text="@string/pref_camera2_not_show_again" + android:textColor="@android:color/black"/> + + <View + android:id="@+id/separator" + android:layout_width="wrap_content" + android:layout_height="1dp" + android:layout_marginTop="15dp" + android:layout_marginBottom="15dp" + android:layout_below="@id/remember_selected" + android:background="#c0c0c0" /> + + <Button + android:id="@+id/scene_mode_instructional_ok" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/separator" + android:background="@android:color/transparent" + android:layout_marginRight="30dp" + android:layout_alignParentRight="true" + android:text="@string/pref_camera2_scene_mode_instructional_ok" + android:textColor="@android:color/black"/> +</RelativeLayout> + diff --git a/res/layout/scene_mode_label.xml b/res/layout/scene_mode_label.xml new file mode 100644 index 000000000..aa5ef211c --- /dev/null +++ b/res/layout/scene_mode_label.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved. + Not a Contribution. + + 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginTop="90dp" + android:layout_marginRight="20dp" + android:gravity="right"> + <com.android.camera.ui.RotateLayout + android:id="@+id/scene_mode_label_rect" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <LinearLayout + android:id="@+id/scene_mode_label_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="20dp" + android:background="#90000000" + android:orientation="horizontal"> + <TextView + android:id="@+id/scene_mode_label" + android:singleLine="true" + android:text="@string/pref_camera_scenemode_entry_chromaflash" + android:textColor="@android:color/white" + android:textSize="16dp" + style="@style/OnViewfinderSceneLabel" /> + <ImageView + android:id="@+id/scene_mode_label_close" + android:src="@drawable/x" + style="@style/OnViewfinderSceneLabel"/> + </LinearLayout> + </com.android.camera.ui.RotateLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml index 31d6b5a62..fbb70b984 100644 --- a/res/values/camera2arrays.xml +++ b/res/values/camera2arrays.xml @@ -213,6 +213,59 @@ <item>@drawable/promode</item> </array> + <array name="pref_camera2_scenemode_black_thumbnails" translatable="false"> + <item>@drawable/ic_scene_mode_black_auto</item> + <item>@drawable/ic_scene_mode_black_dual_camera</item> + <item>@drawable/ic_scene_mode_black_hdr</item> + <item>@drawable/ic_scene_mode_black_ubifocus</item> + <item>@drawable/ic_scene_mode_black_optizoom</item> + <item>@drawable/ic_scene_mode_black_portrait</item> + <item>@drawable/ic_scene_mode_black_landscape</item> + <item>@drawable/ic_scene_mode_black_sports</item> + <item>@drawable/ic_scene_mode_black_flowers</item> + <item>@drawable/ic_scene_mode_black_backlight</item> + <item>@drawable/ic_scene_mode_black_candlelight</item> + <item>@drawable/ic_scene_mode_black_sunset</item> + <item>@drawable/ic_scene_mode_black_night</item> + <item>@drawable/ic_scene_mode_black_beach</item> + <item>@drawable/ic_scene_mode_black_snow</item> + <item>@drawable/ic_scene_mode_smartauto</item> + <item>@drawable/ic_scene_mode_black_best_photo</item> + <item>@drawable/ic_scene_mode_black_chroma_flash</item> + <item>@drawable/ic_scene_mode_black_blur_buster</item> + <item>@drawable/ic_scene_mode_black_sharp_photo</item> + <item>@drawable/ic_scene_mode_black_tracking_focus</item> + <item>@drawable/ic_scene_mode_black_panorama</item> + <item>@drawable/ic_scene_mode_black_dual_camera</item> + </array> + + <!-- Camera Preferences Scene Mode dialog box entries --> + <string-array name="pref_camera2_scenemode_instructional_entries" translatable="false"> + <item>@string/pref_camera_scenemode_entry_auto</item> + <item>@string/pref_camera2_scene_mode_dual_camera_instructional_content</item> + <item>@string/pref_camera2_scene_mode_hdr_instructional_content</item> + <item>@string/pref_camera2_scene_mode_ubi_focus_instructional_content</item> + <item>@string/pref_camera2_scene_mode_opti_zoom_instructional_content</item> + <item>""</item> + <item>""</item> + <item>@string/pref_camera2_scene_mode_sports_instructional_content</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>""</item> + <item>@string/pref_camera2_scene_mode_best_photo_instructional_content</item> + <item>@string/pref_camera2_scene_mode_chroma_flash_instructional_content</item> + <item>@string/pref_camera2_scene_mode_blur_buster_instructional_content</item> + <item>@string/pref_camera2_scene_mode_sharp_photo_instructional_content</item> + <item>@string/pref_camera2_scene_mode_tracking_focus_instructional_content</item> + <item>@string/pref_camera2_scene_mode_panorama_instructional_content</item> + <item>@string/pref_camera2_scene_mode_pro_instructional_content</item> + </string-array> + <string-array name="pref_camera2_whitebalance_entryvalues" translatable="false"> <item>1</item> <item>2</item> diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml index d53b2c27a..509fae318 100644 --- a/res/values/qcomstrings.xml +++ b/res/values/qcomstrings.xml @@ -1063,5 +1063,22 @@ <string name="perf_camera2_preferences_category_photo" translatable="true">Still camera</string> <string name="perf_camera2_preferences_category_video" translatable="true">Video camera</string> <string name="perf_camera2_preferences_category_system" translatable="true">System</string> + + <string name="pref_camera2_scene_mode_dual_camera_instructional_content" translatable="true">In dual camera mode, your pictures will be clearer. You can also apply background effects, by editing your dual camera pictures in the Gallery.</string> + <string name="pref_camera2_scene_mode_ubi_focus_instructional_content" translatable="true">With UbiFocus, your camera will take five pictures and combine them into one picture,where everything is in focus. You can choose to re-focus, after you take the picture.</string> + <string name="pref_camera2_scene_mode_opti_zoom_instructional_content" translatable="true">Use Optizoom when you want to zoom in for a clear picture.You can zoom before, or after taking the picture.</string> + <string name="pref_camera2_scene_mode_sports_instructional_content" translatable="true">Sports mode helps you take better sports or action shots.\n\nImporves your photos, but has no effect on video recording.</string> + <string name="pref_camera2_scene_mode_hdr_instructional_content" translatable="true">When you are in mixed lighting conditions such as low light and backlit scenes select "HDR" for best possible pictures.</string> + <string name="pref_camera2_scene_mode_best_photo_instructional_content" translatable="true">Allows you to take a burst of 10 photos, and you can choose the best one(s).</string> + <string name="pref_camera2_scene_mode_chroma_flash_instructional_content" translatable="true">With ChromaFlash, the lighting in your flash photos will be optimized for all of the people and objects in your pictures.This feature applies only to the back camera.</string> + <string name="pref_camera2_scene_mode_sharp_photo_instructional_content" translatable="true">Sharp Phot reduces blur that is due to motion in the scene, or due to hand motion.</string> + <string name="pref_camera2_scene_mode_tracking_focus_instructional_content" translatable="true">Allows you to track and focus a selected person or object while taking pictures or videos. To start, position the focus rectangle on a person or object you want to track.</string> + <string name="pref_camera2_scene_mode_time_lapse_instructional_content" translatable="true">With Time Lapse, you can transform a long video recording into a few seconds of video.This effect applies to videos, but not photos.</string> + <string name="pref_camera2_scene_mode_panorama_instructional_content" translatable="true">Allows you to pan left or right to take a wide landscape photo. You can alse pan up or down to take tall photos.</string> + <string name="pref_camera2_scene_mode_blur_buster_instructional_content" translatable="true">BlurBuster reduces blur from shaky hands.It can be helpful when taking photos in difficult places.</string> + <string name="pref_camera2_scene_mode_pro_instructional_content" translatable="true">With Pro Mode, you can manually control settings for ISO,Exposure, White Balance, and Focus. You will have easy access to all of these advanced settings</string> + + <string name="pref_camera2_not_show_again">Do not show again</string> + <string name="pref_camera2_scene_mode_instructional_ok" translatable="true">OK</string> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 082c5ed8a..8432c11e9 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -316,4 +316,18 @@ <style name="PanoViewHorizontalBar"> <item name="android:background">@android:color/transparent</item> </style> + + <style name="OnViewfinderSceneLabel"> + <item name="android:gravity">center</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_marginLeft">10dp</item> + <item name="android:layout_marginRight">10dp</item> + <item name="android:layout_marginTop">5dp</item> + <item name="android:layout_marginBottom">5dp</item> + <item name="android:singleLine">true</item> + <item name="android:textColor">@android:color/white</item> + <item name="android:textSize">16dp</item> + <item name="android:background">@android:color/transparent</item> + </style> </resources> diff --git a/res/xml/capture_preferences.xml b/res/xml/capture_preferences.xml index f3603c443..8ad300fe7 100644 --- a/res/xml/capture_preferences.xml +++ b/res/xml/capture_preferences.xml @@ -124,6 +124,14 @@ camera:title="@string/pref_camera_scenemode_title"/> <IconListPreference + camera:defaultValue="@string/pref_camera2_scenemode_default" + camera:entries="@array/pref_camera2_scenemode_instructional_entries" + camera:entryValues="@array/pref_camera2_scenemode_entryvalues" + camera:key="pref_camera2_scenemode_instructional" + camera:thumbnails="@array/pref_camera2_scenemode_black_thumbnails" + camera:title="@string/pref_camera_scenemode_title"/> + + <IconListPreference camera:defaultValue="@string/setting_off_value" camera:entries="@array/pref_camera2_redeyereduction_entries" camera:entryValues="@array/pref_camera2_redeyereduction_entryvalues" |