diff options
author | Jim Miller <jaggies@google.com> | 2012-04-27 17:33:44 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2012-05-06 22:39:18 -0700 |
commit | 354619c1cc1b4668c81c5368b2256335cc9e8538 (patch) | |
tree | ee4afffcfe5988d5ce3e5562e9712cd97b2c00e4 /packages/SystemUI/res | |
parent | b709528407614642b2384063426d60ea12490607 (diff) | |
download | frameworks_base-354619c1cc1b4668c81c5368b2256335cc9e8538.zip frameworks_base-354619c1cc1b4668c81c5368b2256335cc9e8538.tar.gz frameworks_base-354619c1cc1b4668c81c5368b2256335cc9e8538.tar.bz2 |
Fix 6397736: Swipe up to search layout fixes
This fixes several layout issues on phones and tablets with MultiWaveView.
It adds a new background scrim to be shown behind the MultiWaveView
on the navigation bar.
MultiWaveView is updated to handle gravity constraints which makes layouts
much more flexible across devices.
Change-Id: I64068f4eaa81ef6c464247049117d53432fcacbd
Diffstat (limited to 'packages/SystemUI/res')
-rw-r--r-- | packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png | bin | 0 -> 21892 bytes | |||
-rw-r--r-- | packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png | bin | 0 -> 11004 bytes | |||
-rw-r--r-- | packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png | bin | 0 -> 34907 bytes | |||
-rw-r--r-- | packages/SystemUI/res/drawable/navbar_search_bg_scrim.png | bin | 7955 -> 0 bytes | |||
-rw-r--r-- | packages/SystemUI/res/layout-land/status_bar_search_panel.xml | 7 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-port/status_bar_search_panel.xml | 7 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml | 23 | ||||
-rw-r--r-- | packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml | 74 | ||||
-rw-r--r-- | packages/SystemUI/res/values-sw600dp/dimens.xml | 14 | ||||
-rw-r--r-- | packages/SystemUI/res/values/dimens.xml | 12 |
10 files changed, 116 insertions, 21 deletions
diff --git a/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png Binary files differnew file mode 100644 index 0000000..4c163a2 --- /dev/null +++ b/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png diff --git a/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png Binary files differnew file mode 100644 index 0000000..21c5abd --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png diff --git a/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png Binary files differnew file mode 100644 index 0000000..7874c63 --- /dev/null +++ b/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png diff --git a/packages/SystemUI/res/drawable/navbar_search_bg_scrim.png b/packages/SystemUI/res/drawable/navbar_search_bg_scrim.png Binary files differdeleted file mode 100644 index d595ed2..0000000 --- a/packages/SystemUI/res/drawable/navbar_search_bg_scrim.png +++ /dev/null diff --git a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml index 2adee33..5d4d989 100644 --- a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml +++ b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml @@ -34,17 +34,18 @@ <RelativeLayout android:id="@+id/search_panel_container" - android:layout_width="230dip" + android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentRight="true"> <com.android.internal.widget.multiwaveview.MultiWaveView android:id="@+id/multi_wave_view" android:orientation="vertical" - android:layout_width="match_parent" + android:layout_width="@dimen/navbar_search_panel_height" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:background="@drawable/navbar_search_bg_scrim" + android:gravity="left" prvandroid:targetDrawables="@array/navbar_search_targets" prvandroid:targetDescriptions="@array/navbar_search_target_descriptions" @@ -54,8 +55,6 @@ prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius" prvandroid:snapMargin="@dimen/navbar_search_snap_margin" prvandroid:hitRadius="@dimen/navbar_search_hit_radius" - prvandroid:verticalOffset="0dip" - prvandroid:horizontalOffset="60dip" prvandroid:feedbackCount="0" prvandroid:vibrationDuration="0" prvandroid:alwaysTrackFinger="true"/> diff --git a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml index 463fa04..2486b75 100644 --- a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml +++ b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml @@ -35,16 +35,17 @@ <RelativeLayout android:id="@+id/search_panel_container" android:layout_width="match_parent" - android:layout_height="230dip" + android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <com.android.internal.widget.multiwaveview.MultiWaveView android:id="@+id/multi_wave_view" android:orientation="horizontal" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="@dimen/navbar_search_panel_height" android:layout_alignParentBottom="true" android:background="@drawable/navbar_search_bg_scrim" + android:gravity="top" prvandroid:targetDrawables="@array/navbar_search_targets" prvandroid:targetDescriptions="@array/navbar_search_target_descriptions" @@ -54,8 +55,6 @@ prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius" prvandroid:snapMargin="@dimen/navbar_search_snap_margin" prvandroid:hitRadius="@dimen/navbar_search_hit_radius" - prvandroid:horizontalOffset="0dip" - prvandroid:verticalOffset="60dip" prvandroid:feedbackCount="0" prvandroid:vibrationDuration="0" prvandroid:alwaysTrackFinger="true"/> diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml index 6e33e27..4b2fbc7 100644 --- a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml +++ b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml @@ -29,23 +29,32 @@ <RelativeLayout android:id="@+id/search_bg_protect" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="0dip"> + android:layout_height="wrap_content"> <RelativeLayout android:id="@+id/search_panel_container" android:layout_width="wrap_content" - android:layout_height="230dip" + android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true"> + android:layout_centerHorizontal="true"> + + <View + android:layout_width="0dip" + android:layout_height="0dip" + android:layout_alignTop="@id/multi_wave_view" + android:layout_alignLeft="@id/multi_wave_view" + android:layout_alignRight="@id/multi_wave_view" + android:layout_alignBottom="@id/multi_wave_view" + android:layout_marginBottom="@dimen/navigation_bar_size" + android:background="@drawable/navbar_search_bg_scrim"/> <com.android.internal.widget.multiwaveview.MultiWaveView android:id="@+id/multi_wave_view" android:orientation="horizontal" android:layout_width="wrap_content" - android:layout_height="match_parent" + android:layout_height="@dimen/navbar_search_panel_height" android:layout_alignParentBottom="true" - android:background="@drawable/navbar_search_bg_scrim" + android:gravity="top" prvandroid:targetDrawables="@array/navbar_search_targets" prvandroid:targetDescriptions="@array/navbar_search_target_descriptions" @@ -55,8 +64,6 @@ prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius" prvandroid:snapMargin="@dimen/navbar_search_snap_margin" prvandroid:hitRadius="@dimen/navbar_search_hit_radius" - prvandroid:horizontalOffset="0dip" - prvandroid:verticalOffset="60dip" prvandroid:feedbackCount="0" prvandroid:vibrationDuration="0" prvandroid:alwaysTrackFinger="true"/> diff --git a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml new file mode 100644 index 0000000..b4872c7 --- /dev/null +++ b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* apps/common/assets/default/default/skins/StatusBar.xml +** +** Copyright 2012, 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.systemui.SearchPanelView + xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android" + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/search_panel_container" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:paddingBottom="0dip"> + + <RelativeLayout + android:id="@+id/search_bg_protect" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <RelativeLayout + android:id="@+id/search_panel_container" + android:layout_width="wrap_content" + android:layout_height="@dimen/navbar_search_panel_height" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true"> + + <View + android:layout_width="0dip" + android:layout_height="0dip" + android:layout_alignTop="@id/multi_wave_view" + android:layout_alignLeft="@id/multi_wave_view" + android:layout_alignRight="@id/multi_wave_view" + android:layout_alignBottom="@id/multi_wave_view" + android:layout_marginBottom="@dimen/navigation_bar_size" + android:background="@drawable/navbar_search_bg_scrim"/> + + <com.android.internal.widget.multiwaveview.MultiWaveView + android:id="@+id/multi_wave_view" + android:orientation="horizontal" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentBottom="true" + + prvandroid:targetDrawables="@array/navbar_search_targets" + prvandroid:targetDescriptions="@array/navbar_search_target_descriptions" + prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions" + prvandroid:handleDrawable="@drawable/navbar_search_handle" + prvandroid:waveDrawable="@drawable/navbar_search_outerring" + prvandroid:outerRadius="@dimen/navbar_search_target_placement_radius" + prvandroid:snapMargin="@dimen/navbar_search_snap_margin" + prvandroid:hitRadius="@dimen/navbar_search_hit_radius" + prvandroid:feedbackCount="0" + prvandroid:vibrationDuration="0" + prvandroid:alwaysTrackFinger="true"/> + + </RelativeLayout> + + </RelativeLayout> + +</com.android.systemui.SearchPanelView> diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index 43ae557..50a61b1 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -19,11 +19,21 @@ <!-- The width of the notification panel window --> <dimen name="notification_panel_width">446dp</dimen> - <!-- Layout parameters for the notification panel --> - <dimen name="notification_panel_margin_bottom">192dp</dimen> + <!-- Layout parameters for the notification panel --> + <dimen name="notification_panel_margin_bottom">192dp</dimen> <dimen name="notification_panel_margin_left">0dp</dimen> <!-- Gravity for the notification panel --> <!-- 0x33 = center_horizontal|top --> <integer name="notification_panel_layout_gravity">0x31</integer> + + <!-- Default target placement radius for navigation bar search target --> + <dimen name="navbar_search_target_placement_radius">182dip</dimen> + + <!-- Diameter of outer shape drawable shown in navbar search--> + <dimen name="navbar_search_outerring_diameter">364dp</dimen> + + <!-- Height of search panel including navigation bar height --> + <dimen name="navbar_search_panel_height">300dip</dimen> + </resources> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index e92dbc5..276d74b 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -116,13 +116,19 @@ <dimen name="navbar_search_hit_radius">60dip</dimen> <!-- Diameter of outer shape drawable shown in navbar search--> - <dimen name="navbar_search_outerring_diameter">300dip</dimen> + <dimen name="navbar_search_outerring_diameter">270dp</dimen> + + <!-- Threshold for swipe-up gesture to activate search dialog --> + <dimen name="navbar_search_up_threshhold">20dip</dimen> + + <!-- Height of search panel including navigation bar height --> + <dimen name="navbar_search_panel_height">230dip</dimen> <!-- Height of the draggable handle at the bottom of the phone notification panel --> <dimen name="close_handle_height">34dp</dimen> - <!-- Layout parameters for the notification panel --> - <dimen name="notification_panel_margin_bottom">0dp</dimen> + <!-- Layout parameters for the notification panel --> + <dimen name="notification_panel_margin_bottom">0dp</dimen> <dimen name="notification_panel_margin_left">0dp</dimen> <!-- Gravity for the notification panel --> |