summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorwqi <wqi@codeaurora.org>2016-05-03 17:17:10 +0800
committerLikai Ding <likaid@codeaurora.org>2016-07-12 11:29:19 +0800
commit99b35c190ab111742881628df6fb93f80463d19b (patch)
tree87b8212681fda239555cc88d7555bcda9a26923e /res
parentb7f0f7f067f5979e7e7e52aa9836ed3dbcca475c (diff)
downloadandroid_packages_apps_Gallery2-99b35c190ab111742881628df6fb93f80463d19b.tar.gz
android_packages_apps_Gallery2-99b35c190ab111742881628df6fb93f80463d19b.tar.bz2
android_packages_apps_Gallery2-99b35c190ab111742881628df6fb93f80463d19b.zip
Gallery2: Modified landscape layout of editor crop in editor interface.
Modified landscape layout of editor crop and keep function is normal according to UX specification document. Change-Id: I1bbd1239b28b806cbb866b44640d1caf79692ecf CRs-Fixed: 988687
Diffstat (limited to 'res')
-rw-r--r--res/layout/filtershow_editor_crop_landscape.xml156
-rw-r--r--res/values/dimens.xml2
2 files changed, 158 insertions, 0 deletions
diff --git a/res/layout/filtershow_editor_crop_landscape.xml b/res/layout/filtershow_editor_crop_landscape.xml
new file mode 100644
index 000000000..414a02422
--- /dev/null
+++ b/res/layout/filtershow_editor_crop_landscape.xml
@@ -0,0 +1,156 @@
+<?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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/crop_panel_height_lanscape">
+
+ <FrameLayout
+ android:id="@+id/bottom_panel"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/crop_panel_height_lanscape"
+ android:background="@color/edit_actionbar_background"
+ android:layout_gravity="center_vertical">
+
+ <ImageButton
+ android:id="@+id/cancel"
+ android:layout_width="@dimen/category_actionbar_panel_height"
+ android:layout_height="@dimen/category_actionbar_panel_height"
+ android:background="@color/edit_actionbar_background"
+ android:layout_gravity="left|center_vertical"
+ android:src="@drawable/cancel" />
+
+
+ <ImageButton
+ android:id="@+id/done"
+ android:layout_width="@dimen/category_actionbar_panel_height"
+ android:layout_height="@dimen/category_actionbar_panel_height"
+ android:background="@color/edit_actionbar_background"
+ android:layout_gravity="right|center_vertical"
+ android:src="@drawable/done" />
+ </FrameLayout>
+
+ <LinearLayout
+ android:layout_width="360dp"
+ android:layout_height="@dimen/crop_panel_height_lanscape"
+ android:background="@android:color/transparent"
+ android:layout_gravity="center"
+ android:clickable="true"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:id="@+id/leftPanel"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:background="@android:color/transparent"
+ android:orientation="vertical" >
+
+ <ImageButton
+ android:id="@+id/leftButton"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/crop_icon_size_landscape"
+ android:scaleType="centerInside"
+ android:background="@android:color/transparent" />
+
+ <TextView
+ android:id="@+id/leftText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:clickable="true"
+ android:background="@android:color/transparent"
+ android:layout_marginTop="@dimen/crop_text_margin_padding"
+ android:textColor="#ffffff"
+ android:textSize="12sp" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/centerPanel"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:clickable="true"
+ android:layout_gravity="center_vertical"
+ android:background="@android:color/transparent"
+ android:orientation="vertical">
+
+ <ImageButton
+ android:id="@+id/centerButton"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/crop_icon_size_landscape"
+ android:scaleType="centerInside"
+ android:background="@android:color/transparent" />
+
+ <TextView
+ android:id="@+id/centerText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:clickable="true"
+ android:background="@android:color/transparent"
+ android:layout_marginTop="@dimen/crop_text_margin_padding"
+ android:textColor="#ffffff"
+ android:textSize="12sp" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/rightPanel"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:clickable="true"
+ android:layout_gravity="center_vertical"
+ android:background="@android:color/transparent"
+ android:orientation="vertical">
+
+ <ImageButton
+ android:id="@+id/rightButton"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/crop_icon_size_landscape"
+ android:scaleType="centerInside"
+ android:background="@android:color/transparent" />
+
+ <TextView
+ android:id="@+id/rightText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:clickable="true"
+ android:background="@android:color/transparent"
+ android:layout_marginTop="@dimen/crop_text_margin_padding"
+ android:textColor="#ffffff"
+ android:textSize="12sp" />
+ </LinearLayout>
+ </LinearLayout>
+
+
+</FrameLayout> \ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index aa7da66eb..e021d35df 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -188,6 +188,8 @@
<dimen name="slot_width_album">116dp</dimen>
<dimen name="slot_height_album">116dp</dimen>
<dimen name="crop_icon_size">30dp</dimen>
+ <dimen name="crop_icon_size_landscape">24dp</dimen>
+ <dimen name="crop_panel_height_lanscape">60dp</dimen>
<dimen name="crop_icon_margin_padding">20dp</dimen>
<dimen name="crop_text_margin_padding">6dp</dimen>
<dimen name="crop_rect_stroke">2dp</dimen>