summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorweijiew <weijiew@codeaurora.org>2016-12-02 19:56:28 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-05 19:04:51 -0800
commitb39e01c54b0d46b8a005e48e88537bc875b4977b (patch)
tree57cdbafc165c847e6cb8826c3e591d18230c1290 /res/layout
parent1faccedafea1dfd535261d5935e457ba353296ef (diff)
downloadandroid_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/layout')
-rw-r--r--res/layout/capture_module.xml3
-rw-r--r--res/layout/pano_capture_module.xml4
-rw-r--r--res/layout/scene_mode_instructional.xml102
-rw-r--r--res/layout/scene_mode_label.xml50
4 files changed, 159 insertions, 0 deletions
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