summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-07-14 11:13:36 -0700
committerJay Wang <jaywang@codeaurora.org>2016-09-27 11:08:28 -0700
commita6038bde5f3fbdd05519f1be8ad6f369fd0365bf (patch)
treeab9761c31171a7053b329a3d08573b370f747336 /res/layout
parent8eefd5866870e7293665df25625ab69fb8e2de0f (diff)
downloadandroid_packages_apps_Snap-a6038bde5f3fbdd05519f1be8ad6f369fd0365bf.tar.gz
android_packages_apps_Snap-a6038bde5f3fbdd05519f1be8ad6f369fd0365bf.tar.bz2
android_packages_apps_Snap-a6038bde5f3fbdd05519f1be8ad6f369fd0365bf.zip
SnapdragonCamera: Add OneUI to Camera2
Add new UI called OneUI to Camera2. It replaces icons, adds 2 new activities for scene menu and setting menu. There is no module change anymore Change-Id: If712e6af7bbc29726dae387168aefbcd2d7c1ea9 CRs-Fixed: 1066519
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/capture_module.xml2
-rw-r--r--res/layout/one_ui_layout.xml113
-rw-r--r--res/layout/preference.xml74
-rw-r--r--res/layout/preferences_category.xml39
-rw-r--r--res/layout/scene_mode_grid.xml43
-rw-r--r--res/layout/scene_mode_menu_layout.xml69
-rw-r--r--res/layout/scene_mode_menu_view.xml62
7 files changed, 401 insertions, 1 deletions
diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml
index 41757c535..4b9a178c0 100644
--- a/res/layout/capture_module.xml
+++ b/res/layout/capture_module.xml
@@ -93,6 +93,6 @@
<include
style="@style/CameraControls"
- layout="@layout/camera_controls"
+ layout="@layout/one_ui_layout"
android:layout_gravity="center" />
</merge>
diff --git a/res/layout/one_ui_layout.xml b/res/layout/one_ui_layout.xml
new file mode 100644
index 000000000..22c2c42e3
--- /dev/null
+++ b/res/layout/one_ui_layout.xml
@@ -0,0 +1,113 @@
+<?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.
+-->
+<com.android.camera.ui.OneUICameraControls xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/camera_controls"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.camera.ui.FlashToggleButton
+ android:id="@+id/flash_button"
+ style="@style/OneUIMenuButton"
+ android:src="@drawable/flash" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/mute_button"
+ style="@style/OneUIMenuButton"
+ android:contentDescription="@string/mute_button_desc"
+ android:src="@drawable/ic_unmuted_button"
+ android:visibility="gone" />
+
+ <com.android.camera.ShutterButton
+ android:id="@+id/shutter_button"
+ android:layout_width="70dp"
+ android:layout_height="70dp"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/photo_capture" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/video_button"
+ android:layout_width="55dp"
+ android:layout_height="55dp"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/video_capture" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/preview_thumb"
+ android:layout_width="@dimen/capture_size"
+ android:layout_height="@dimen/capture_size"
+ android:layout_gravity="top|right"
+ android:background="@android:color/transparent"
+ android:contentDescription="@string/switch_photo_filmstrip"
+ android:scaleType="fitCenter" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/front_back_switcher"
+ style="@style/OneUIMenuButton"
+ android:src="@drawable/front_back_camera" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/hdr_switcher"
+ style="@style/OneUIMenuButton" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/scene_mode_switcher"
+ style="@style/OneUIMenuButton"
+ android:src="@drawable/more_options" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/filter_mode_switcher"
+ style="@style/OneUIMenuButton"
+ android:src="@drawable/filters" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/ts_makeup_switcher"
+ style="@style/OneUIMenuButton"
+ android:src="@drawable/beautify" />
+
+ <LinearLayout
+ android:id="@+id/remaining_photos"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent"
+ android:orientation="horizontal"
+ android:visibility="gone">
+
+ <TextView
+ android:id="@+id/remaining_photos_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent"
+ android:textColor="@android:color/white"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/remaining_photos_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/remaining_sheets"
+ android:visibility="gone" />
+ </LinearLayout>
+
+</com.android.camera.ui.OneUICameraControls>
diff --git a/res/layout/preference.xml b/res/layout/preference.xml
new file mode 100644
index 000000000..68b931fbb
--- /dev/null
+++ b/res/layout/preference.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ Not a Contribution.
+
+ Copyright (C) 2006 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="50dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:gravity="center_vertical"
+ android:paddingEnd="?android:attr/scrollbarSize">
+
+ <ImageView
+ android:id="@+android:id/icon"
+ android:layout_width="25dp"
+ android:layout_height="25dp"
+ android:layout_gravity="center"
+ android:layout_marginEnd="30dp"
+ android:layout_marginStart="15dp"
+ android:scaleType="fitCenter" />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="6dip"
+ android:layout_marginEnd="6dip"
+ android:layout_marginTop="6dip"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignStart="@android:id/title"
+ android:layout_below="@android:id/title"
+ android:maxLines="4"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="#ff2d82e2"
+ android:textSize="11sp" />
+
+ </RelativeLayout>
+
+ <!-- Preference should place its actual preference widget here. -->
+ <LinearLayout
+ android:id="@+android:id/widget_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:orientation="vertical" />
+
+</LinearLayout>
diff --git a/res/layout/preferences_category.xml b/res/layout/preferences_category.xml
new file mode 100644
index 000000000..3dae03b0a
--- /dev/null
+++ b/res/layout/preferences_category.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/title"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:gravity="center_vertical"
+ android:paddingLeft="15dp"
+ android:paddingTop="15dp"
+ android:textAllCaps="true"
+ android:textColor="#ff999999"
+ android:textSize="14sp"
+ android:textStyle="bold" />
diff --git a/res/layout/scene_mode_grid.xml b/res/layout/scene_mode_grid.xml
new file mode 100644
index 000000000..b149b4cfe
--- /dev/null
+++ b/res/layout/scene_mode_grid.xml
@@ -0,0 +1,43 @@
+<?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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <GridView
+ android:id="@+id/grid"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:columnWidth="@dimen/scene_mode_width"
+ android:horizontalSpacing="10dp"
+ android:numColumns="auto_fit"
+ android:stretchMode="columnWidth"
+ android:verticalSpacing="10dp"></GridView>
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/scene_mode_menu_layout.xml b/res/layout/scene_mode_menu_layout.xml
new file mode 100644
index 000000000..9c10bd73e
--- /dev/null
+++ b/res/layout/scene_mode_menu_layout.xml
@@ -0,0 +1,69 @@
+<?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:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/blur"
+ android:padding="5dp">
+
+ <ImageView
+ android:id="@+id/close_button"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:padding="10dp"
+ android:scaleType="fitCenter"
+ android:src="@drawable/x" />
+
+ <android.support.v4.view.ViewPager
+ android:id="@+id/pager"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_above="@+id/page_indicator"
+ android:layout_below="@+id/close_button" />
+
+ <com.android.camera.ui.DotsView
+ android:id="@+id/page_indicator"
+ android:layout_width="80dp"
+ android:layout_height="25dp"
+ android:layout_above="@+id/setting_button"
+ android:layout_centerHorizontal="true"
+ android:layout_margin="5dp" />
+
+ <com.android.camera.ui.RotateImageView
+ android:id="@+id/setting_button"
+ android:layout_width="30dp"
+ android:layout_height="30dp"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_margin="10dp"
+ android:scaleType="fitCenter"
+ android:src="@drawable/settings" />
+</RelativeLayout>
diff --git a/res/layout/scene_mode_menu_view.xml b/res/layout/scene_mode_menu_view.xml
new file mode 100644
index 000000000..cfa0dba9c
--- /dev/null
+++ b/res/layout/scene_mode_menu_view.xml
@@ -0,0 +1,62 @@
+<?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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="90dp"
+ android:layout_height="90dp"
+ android:layout_gravity="center"
+ android:orientation="vertical"
+ android:padding="5dp">
+
+ <LinearLayout
+ android:id="@+id/border"
+ android:layout_width="80dp"
+ android:layout_height="80dp"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="2dp">
+
+ <ImageView
+ android:id="@+id/image"
+ android:layout_width="30dp"
+ android:layout_height="30dp"
+ android:layout_gravity="center"
+ android:scaleType="fitCenter" />
+
+ <TextView
+ android:id="@+id/label"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:textColor="@android:color/white"
+ android:textSize="12sp" />
+ </LinearLayout>
+
+</LinearLayout>