diff options
author | Daniel Sandler <dsandler@android.com> | 2012-10-03 10:40:00 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-10-03 10:40:00 -0400 |
commit | e5f7ec0576a25abc7a9754c72d61d86a251347e2 (patch) | |
tree | 87d6e16e1344202532e988bf036377ad753e0c57 /packages/SystemUI/res | |
parent | f175525be4107649581259d04711f9ead905d447 (diff) | |
download | frameworks_base-e5f7ec0576a25abc7a9754c72d61d86a251347e2.zip frameworks_base-e5f7ec0576a25abc7a9754c72d61d86a251347e2.tar.gz frameworks_base-e5f7ec0576a25abc7a9754c72d61d86a251347e2.tar.bz2 |
Allow QS to be closed via drag on background.
This was already working fine for the area of the panel
below the ScrollView, but intuitively it seems that dragging
in the unused portion of a partially-filled row would behave
the same way. Because it's part of the scrolling content,
though, drags in that region are (correctly) interpreted by
the ScrollView as scrolling requests.
The new QuickSettingsScrollView works around this by
ignoring touch events if its contents are too small to be
scrolled. So in the common case (QS tiles on a phone) you
will be able to drag in any empty area and have your taps
interpreted by the PanelView (which hands them off to the
handle to collapse the view).
We don't handle drags in empty areas when there are too many
tiles to show on-screen, and really, it's impossible to do
so: this gesture should then definitely be interpreted as a
scroll.
Bug: 7203193
Change-Id: I4cfcb029481a88d3604c7105185e8bcb7dbde8a5
Diffstat (limited to 'packages/SystemUI/res')
-rw-r--r-- | packages/SystemUI/res/layout/quick_settings.xml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/res/layout/quick_settings.xml b/packages/SystemUI/res/layout/quick_settings.xml index c1bcdfe..d119cf5 100644 --- a/packages/SystemUI/res/layout/quick_settings.xml +++ b/packages/SystemUI/res/layout/quick_settings.xml @@ -22,10 +22,11 @@ android:background="@drawable/notification_panel_bg" > <!-- TODO: Put into ScrollView --> - <ScrollView + <com.android.systemui.statusbar.phone.QuickSettingsScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" + android:overScrollMode="ifContentScrolls" > <com.android.systemui.statusbar.phone.QuickSettingsContainerView android:id="@+id/quick_settings_container" @@ -34,7 +35,7 @@ android:animateLayoutChanges="true" android:columnCount="@integer/quick_settings_num_columns" /> - </ScrollView> + </com.android.systemui.statusbar.phone.QuickSettingsScrollView> <View android:id="@+id/handle" |