summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2017-05-11 11:18:11 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-30 23:55:21 -0700
commitc19033fea5af15e177b2b49044c512811d1b1cb5 (patch)
tree0d6e88a56c61d4c6911d5a03f80b103093c8136c /res
parent693b46e3a50a16d2aa8f2ea8d7f5adcc105dbf11 (diff)
downloadandroid_packages_apps_Snap-c19033fea5af15e177b2b49044c512811d1b1cb5.tar.gz
android_packages_apps_Snap-c19033fea5af15e177b2b49044c512811d1b1cb5.tar.bz2
android_packages_apps_Snap-c19033fea5af15e177b2b49044c512811d1b1cb5.zip
SnapdragonCamera: Fix UI Display confusion in ProMode
Refactoring the layout of pro_mode_layout.xml, optimizing layout files, and reducing performace overhead. CRs-Fixed: 2027214 Change-Id: I7005b5a38498b6867c0d6b971aef13fcd1359433
Diffstat (limited to 'res')
-rw-r--r--res/drawable/promode_exposure.xml33
-rw-r--r--res/drawable/promode_iso.xml33
-rw-r--r--res/drawable/promode_manual.xml33
-rw-r--r--res/drawable/promode_white_balance.xml33
-rw-r--r--res/layout/pro_mode_layout.xml114
5 files changed, 169 insertions, 77 deletions
diff --git a/res/drawable/promode_exposure.xml b/res/drawable/promode_exposure.xml
new file mode 100644
index 000000000..ff2afa49a
--- /dev/null
+++ b/res/drawable/promode_exposure.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2017, 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/icon_exposure_blue" />
+ <item android:drawable="@drawable/icon_exposure" />
+</selector>
diff --git a/res/drawable/promode_iso.xml b/res/drawable/promode_iso.xml
new file mode 100644
index 000000000..26b31a5b8
--- /dev/null
+++ b/res/drawable/promode_iso.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2017, 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/icon_iso_blue" />
+ <item android:drawable="@drawable/icon_iso" />
+</selector>
diff --git a/res/drawable/promode_manual.xml b/res/drawable/promode_manual.xml
new file mode 100644
index 000000000..133b43180
--- /dev/null
+++ b/res/drawable/promode_manual.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2017, 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/icon_manual_blue" />
+ <item android:drawable="@drawable/icon_manual" />
+</selector>
diff --git a/res/drawable/promode_white_balance.xml b/res/drawable/promode_white_balance.xml
new file mode 100644
index 000000000..91b98ac8c
--- /dev/null
+++ b/res/drawable/promode_white_balance.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Copyright (c) 2017, 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true" android:state_pressed="false"
+ android:drawable="@drawable/icon_white_balance_blue" />
+ <item android:drawable="@drawable/icon_white_balance" />
+</selector>
diff --git a/res/layout/pro_mode_layout.xml b/res/layout/pro_mode_layout.xml
index 54ccb556c..b295ac318 100644
--- a/res/layout/pro_mode_layout.xml
+++ b/res/layout/pro_mode_layout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
+<!-- Copyright (c) 2016-2017 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
@@ -35,114 +35,74 @@
<com.android.camera.ui.RotateLayout
android:id="@+id/exposure_rotate_layout"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
- <LinearLayout
- android:id="@+id/exposure_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ <TextView
+ android:id="@+id/exposure_value"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:drawableTop="@drawable/promode_exposure"
android:gravity="center"
- android:orientation="vertical">
+ android:layout_gravity="center"
+ android:layout_weight="1"/>
- <ImageView
- android:id="@+id/exposure"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:src="@drawable/icon_exposure" />
-
- <TextView
- android:id="@+id/exposure_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
- </LinearLayout>
</com.android.camera.ui.RotateLayout>
<com.android.camera.ui.RotateLayout
android:id="@+id/manual_rotate_layout"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
- <LinearLayout
- android:id="@+id/manual_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ <TextView
+ android:id="@+id/manual_value"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:drawableTop="@drawable/promode_manual"
android:gravity="center"
- android:orientation="vertical">
-
- <ImageView
- android:id="@+id/manual"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:src="@drawable/icon_manual" />
+ android:layout_gravity="center"
+ android:layout_weight="1" />
- <TextView
- android:id="@+id/manual_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
- </LinearLayout>
</com.android.camera.ui.RotateLayout>
<com.android.camera.ui.RotateLayout
android:id="@+id/white_balance_rotate_layout"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
- <LinearLayout
- android:id="@+id/white_balance_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ <TextView
+ android:id="@+id/white_balance_value"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:drawableTop="@drawable/promode_white_balance"
android:gravity="center"
- android:orientation="vertical">
+ android:layout_gravity="center"
+ android:layout_weight="1"/>
- <ImageView
- android:id="@+id/white_balance"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:src="@drawable/icon_white_balance" />
-
- <TextView
- android:id="@+id/white_balance_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
- </LinearLayout>
</com.android.camera.ui.RotateLayout>
<com.android.camera.ui.RotateLayout
android:id="@+id/iso_rotate_layout"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
- <LinearLayout
- android:id="@+id/iso_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ <TextView
+ android:id="@+id/iso_value"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:drawableTop="@drawable/promode_iso"
+ android:focusable="true"
android:gravity="center"
- android:orientation="vertical">
-
- <ImageView
- android:id="@+id/iso"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:src="@drawable/icon_iso" />
+ android:layout_gravity="center"
+ android:layout_weight="1"/>
- <TextView
- android:id="@+id/iso_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
- </LinearLayout>
</com.android.camera.ui.RotateLayout>
</LinearLayout>