From f37a21412afb16f61ca23b5aca2e90691b57e171 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 24 Mar 2016 17:28:25 -0700 Subject: [PATCH] Defining separate layouts for horizontal and vertical drop target bars instead of chaning the layouts in DeviceProfile Bug: 27721989 Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204 --- res/layout-land/launcher.xml | 4 +- res/layout-port/launcher.xml | 4 +- res/layout-sw720dp/launcher.xml | 4 +- ..._bar.xml => drop_target_bar_horz_info.xml} | 33 +++++------ ...ar.xml => drop_target_bar_horz_search.xml} | 22 ++++++-- res/layout/drop_target_bar_vert_info.xml | 39 +++++++++++++ res/layout/drop_target_bar_vert_search.xml | 56 +++++++++++++++++++ res/values-land/dimens.xml | 4 -- res/values-land/styles.xml | 39 ------------- res/values-sw720dp/styles.xml | 5 -- res/values/attrs.xml | 4 ++ res/values/styles.xml | 9 --- .../android/launcher3/ButtonDropTarget.java | 21 +++---- .../android/launcher3/DeleteDropTarget.java | 3 +- src/com/android/launcher3/DeviceProfile.java | 27 +-------- 15 files changed, 153 insertions(+), 121 deletions(-) rename res/layout/{app_info_drop_target_bar.xml => drop_target_bar_horz_info.xml} (55%) rename res/layout/{search_drop_target_bar.xml => drop_target_bar_horz_search.xml} (65%) create mode 100644 res/layout/drop_target_bar_vert_info.xml create mode 100644 res/layout/drop_target_bar_vert_search.xml delete mode 100644 res/values-land/styles.xml diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index 63e460e5de..3a361e28d7 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -52,11 +52,11 @@ + layout="@layout/drop_target_bar_vert_info" /> + layout="@layout/drop_target_bar_vert_search" /> + layout="@layout/drop_target_bar_horz_info" /> + layout="@layout/drop_target_bar_horz_search" /> + layout="@layout/drop_target_bar_horz_info" /> + layout="@layout/drop_target_bar_horz_search" /> - - + android:layout_height="match_parent"> - - - - - - - + + + \ No newline at end of file diff --git a/res/layout/search_drop_target_bar.xml b/res/layout/drop_target_bar_horz_search.xml similarity index 65% rename from res/layout/search_drop_target_bar.xml rename to res/layout/drop_target_bar_horz_search.xml index 50f96791a2..7997801b4a 100644 --- a/res/layout/search_drop_target_bar.xml +++ b/res/layout/drop_target_bar_horz_search.xml @@ -1,6 +1,6 @@ + android:layout_gravity="center_horizontal|top" + android:focusable="false"> @@ -28,24 +30,36 @@ android:layout_gravity="center" > diff --git a/res/layout/drop_target_bar_vert_info.xml b/res/layout/drop_target_bar_vert_info.xml new file mode 100644 index 0000000000..da33d1a9c2 --- /dev/null +++ b/res/layout/drop_target_bar_vert_info.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/drop_target_bar_vert_search.xml b/res/layout/drop_target_bar_vert_search.xml new file mode 100644 index 0000000000..d5e41df392 --- /dev/null +++ b/res/layout/drop_target_bar_vert_search.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index 2be9391540..3915759952 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -15,10 +15,6 @@ --> - - 8dip - 0dip - 12% diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml deleted file mode 100644 index 40926799fb..0000000000 --- a/res/values-land/styles.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml index 1fdb267c76..674edaabc7 100644 --- a/res/values-sw720dp/styles.xml +++ b/res/values-sw720dp/styles.xml @@ -28,11 +28,6 @@ - - - -