summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2016-07-18 17:18:02 -0700
committerWinson <winsonc@google.com>2016-07-20 10:17:08 -0700
commit1f06427266c0cb5de4561fc7c620ff542f625300 (patch)
tree59869923b1a0affd0521eda603a85ccb64bbea53 /res
parent5b3ace8e56988eb493a3423f9e25b29909fa50bf (diff)
downloadandroid_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.tar.gz
android_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.tar.bz2
android_packages_apps_Trebuchet-1f06427266c0cb5de4561fc7c620ff542f625300.zip
Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due to insets. This is necessary since there are now different layouts depending on which side the navigation bar is on - Consolidating hotseat and other layout into the device profile launcher layout logic - Making the all apps icons match the workspace icon height - Tweaking caret drawable to draw to the bounds specified to simplify layout in each orientation - Fixing minor issue with page indicator shifting in landscape - Centering overview buttons to the workspace page Bug: 30021487 Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
Diffstat (limited to 'res')
-rw-r--r--res/layout-land/launcher.xml5
-rw-r--r--res/layout-port/launcher.xml3
-rw-r--r--res/layout-sw720dp/launcher.xml3
-rw-r--r--res/layout/all_apps.xml8
-rw-r--r--res/layout/all_apps_icon.xml5
-rw-r--r--res/layout/widgets_view.xml2
-rw-r--r--res/values-sw600dp-land/dimens.xml20
-rw-r--r--res/values-sw600dp/dimens.xml6
-rw-r--r--res/values-sw720dp/dimens.xml1
-rw-r--r--res/values-sw768dp-port/dimens.xml20
-rw-r--r--res/values/attrs.xml1
-rw-r--r--res/values/dimens.xml30
12 files changed, 28 insertions, 76 deletions
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 632aff04b..5c1fec7e3 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -44,7 +44,8 @@
android:id="@+id/hotseat"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_gravity="right" />
+ android:layout_gravity="right"
+ launcher:layout_ignoreInsets="true" />
<include
android:id="@+id/drop_target_bar"
@@ -56,7 +57,7 @@
<com.android.launcher3.pageindicators.PageIndicatorCaretLandscape
android:id="@+id/page_indicator"
- android:layout_width="48dp"
+ android:layout_width="@dimen/dynamic_grid_page_indicator_height"
android:layout_height="@dimen/dynamic_grid_page_indicator_height"
android:layout_gravity="bottom|left"/>
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 0321631ca..b394fa835 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -45,7 +45,8 @@
<include layout="@layout/hotseat"
android:id="@+id/hotseat"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ launcher:layout_ignoreInsets="true" />
<include layout="@layout/overview_panel"
android:id="@+id/overview_panel"
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 86544d3b2..b59c715d7 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -44,7 +44,8 @@
<include layout="@layout/hotseat"
android:id="@+id/hotseat"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ launcher:layout_ignoreInsets="true" />
<include
android:id="@+id/drop_target_bar"
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 12a4029a9..03c8d8229 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -22,8 +22,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:paddingBottom="@dimen/container_bounds_inset"
- android:paddingTop="@dimen/container_bounds_inset"
launcher:revealBackground="@drawable/quantum_panel_shape">
<View
@@ -62,12 +60,10 @@
android:layout_width="match_parent"
android:layout_height="@dimen/all_apps_search_bar_height"
android:layout_gravity="center|top"
- android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
- android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+ android:paddingTop="@dimen/all_apps_search_bar_margin_top"
android:gravity="center|bottom"
android:orientation="horizontal"
- android:saveEnabled="false"
- android:paddingTop="@dimen/all_apps_search_bar_margin_top" >
+ android:saveEnabled="false">
<TextView
android:layout_width="wrap_content"
diff --git a/res/layout/all_apps_icon.xml b/res/layout/all_apps_icon.xml
index 3836fed89..3d4bef70c 100644
--- a/res/layout/all_apps_icon.xml
+++ b/res/layout/all_apps_icon.xml
@@ -21,8 +21,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:paddingTop="@dimen/all_apps_icon_top_bottom_padding"
- android:paddingBottom="@dimen/all_apps_icon_top_bottom_padding"
android:focusable="true"
- launcher:iconDisplay="all_apps" />
+ launcher:iconDisplay="all_apps"
+ launcher:centerVertically="true" />
diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml
index 74f7ca10b..c4431be25 100644
--- a/res/layout/widgets_view.xml
+++ b/res/layout/widgets_view.xml
@@ -22,8 +22,6 @@
android:id="@+id/widgets_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="@dimen/container_bounds_inset"
- android:paddingBottom="@dimen/container_bounds_inset"
android:descendantFocusability="afterDescendants"
launcher:revealBackground="@drawable/quantum_panel_shape_dark"
android:theme="@style/WidgetContainerTheme">
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
deleted file mode 100644
index 1f97d2460..000000000
--- a/res/values-sw600dp-land/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<resources>
-<!-- Container -->
- <dimen name="container_max_width">736dp</dimen>
-</resources>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 85a436cf9..283808805 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -15,21 +15,15 @@
-->
<resources>
-<!-- Container -->
- <dimen name="container_min_margin">16dp</dimen>
-
<!-- All Apps -->
<dimen name="all_apps_grid_view_start_margin">0dp</dimen>
<dimen name="all_apps_grid_section_text_size">26sp</dimen>
- <dimen name="all_apps_icon_top_bottom_padding">12dp</dimen>
<dimen name="all_apps_background_canvas_width">850dp</dimen>
<dimen name="all_apps_background_canvas_height">525dp</dimen>
- <dimen name="all_apps_icon_width_gap">36dp</dimen>
<!-- Widget tray -->
<dimen name="widget_section_indent">56dp</dimen>
-
<!-- DragController -->
<dimen name="drag_flingToDeleteMinVelocity">-1000dp</dimen>
</resources>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index c2d20a310..358d9b6a0 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -18,7 +18,6 @@
<!-- All Apps -->
<dimen name="all_apps_button_scale_down">8dp</dimen>
<dimen name="all_apps_search_bar_height">54dp</dimen>
- <dimen name="all_apps_icon_top_bottom_padding">14dp</dimen>
<dimen name="all_apps_empty_search_message_top_offset">64dp</dimen>
<dimen name="all_apps_empty_search_bg_top_offset">180dp</dimen>
diff --git a/res/values-sw768dp-port/dimens.xml b/res/values-sw768dp-port/dimens.xml
deleted file mode 100644
index 6fb2bf69a..000000000
--- a/res/values-sw768dp-port/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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.
--->
-
-<resources>
-<!-- Container -->
- <dimen name="container_max_width">736dp</dimen>
-</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 308c71c41..3cfaf02d0 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -29,6 +29,7 @@
</attr>
<attr name="deferShadowGeneration" format="boolean" />
<attr name="customShadows" format="boolean" />
+ <attr name="centerVertically" format="boolean" />
</declare-styleable>
<!-- PagedView specific attributes. These attributes are used to customize
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 8b02e5aac..cbbafac61 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,20 +16,26 @@
<resources>
<!-- Dynamic Grid -->
- <dimen name="dynamic_grid_edge_margin">6dp</dimen>
- <dimen name="dynamic_grid_page_indicator_height">24dp</dimen>
+ <dimen name="dynamic_grid_edge_margin">8dp</dimen>
+ <dimen name="dynamic_grid_page_indicator_height">28dp</dimen>
<dimen name="dynamic_grid_page_indicator_line_height">1dp</dimen>
<dimen name="dynamic_grid_page_indicator_extra_touch_height">12dp</dimen>
- <dimen name="dynamic_grid_icon_drawable_padding">4dp</dimen>
- <dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
+ <dimen name="dynamic_grid_page_indicator_gutter_width_left_nav_bar">38dp</dimen>
+ <dimen name="dynamic_grid_page_indicator_gutter_width_right_nav_bar">48dp</dimen>
+ <dimen name="dynamic_grid_icon_drawable_padding">8dp</dimen>
<dimen name="dynamic_grid_overview_min_icon_zone_height">80dp</dimen>
<dimen name="dynamic_grid_overview_max_icon_zone_height">120dp</dimen>
<dimen name="dynamic_grid_overview_bar_item_width">80dp</dimen>
- <dimen name="dynamic_grid_overview_bar_spacer_width">20dp</dimen>
-
+ <dimen name="dynamic_grid_overview_bar_spacer_width">25dp</dimen>
+ <dimen name="dynamic_grid_hotseat_height">88dp</dimen>
+ <dimen name="dynamic_grid_hotseat_top_padding">12dp</dimen>
+ <dimen name="dynamic_grid_hotseat_gutter_width">24dp</dimen>
<dimen name="dynamic_grid_workspace_top_padding">12dp</dimen>
+ <dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
<!-- Minimum space between workspace and hotseat in spring loaded mode -->
<dimen name="dynamic_grid_min_spring_loaded_space">8dp</dimen>
+ <dimen name="dynamic_grid_container_land_left_padding">118dp</dimen>
+ <dimen name="dynamic_grid_container_land_right_padding">66dp</dimen>
<!-- Drop target bar -->
<dimen name="dynamic_grid_drop_target_size">48dp</dimen>
@@ -54,28 +60,23 @@
<dimen name="container_fastscroll_popup_size">72dp</dimen>
<dimen name="container_fastscroll_popup_text_size">48dp</dimen>
- <item name="container_margin" format="fraction" type="fraction">0%</item>
- <dimen name="container_min_margin">8dp</dimen>
- <dimen name="container_max_width">0dp</dimen>
-
<!-- All Apps -->
<dimen name="all_apps_button_scale_down">0dp</dimen>
<dimen name="all_apps_grid_view_start_margin">0dp</dimen>
<dimen name="all_apps_grid_section_y_offset">8dp</dimen>
<dimen name="all_apps_grid_section_text_size">24sp</dimen>
<dimen name="all_apps_search_bar_height">60dp</dimen>
- <dimen name="all_apps_search_bar_margin_top">5dp</dimen>
+ <dimen name="all_apps_search_bar_margin_top">12dp</dimen>
<dimen name="all_apps_search_bar_icon_margin_right">4dp</dimen>
<dimen name="all_apps_search_bar_icon_margin_top">1dp</dimen>
- <dimen name="all_apps_icon_top_bottom_padding">8dp</dimen>
- <dimen name="all_apps_icon_width_gap">24dp</dimen>
<dimen name="all_apps_list_bottom_padding">8dp</dimen>
<dimen name="all_apps_empty_search_message_top_offset">40dp</dimen>
<dimen name="all_apps_empty_search_bg_top_offset">144dp</dimen>
<dimen name="all_apps_background_canvas_width">700dp</dimen>
<dimen name="all_apps_background_canvas_height">475dp</dimen>
<dimen name="all_apps_caret_stroke_width">2dp</dimen>
- <dimen name="all_apps_caret_inset">8dp</dimen>
+ <dimen name="all_apps_caret_size">13dp</dimen>
+ <dimen name="all_apps_caret_workspace_offset">4dp</dimen>
<!-- Search bar in All Apps -->
<dimen name="all_apps_header_max_elevation">3dp</dimen>
@@ -85,6 +86,7 @@
<dimen name="all_apps_divider_margin_vertical">8dp</dimen>
<dimen name="all_apps_bezel_swipe_height">24dp</dimen>
+
<!-- Widget tray -->
<dimen name="widget_preview_label_vertical_padding">8dp</dimen>
<dimen name="widget_preview_label_horizontal_padding">8dp</dimen>