OSDN Git Service

Allow QS to be closed via drag on background.
authorDaniel Sandler <dsandler@android.com>
Wed, 3 Oct 2012 14:40:00 +0000 (10:40 -0400)
committerDaniel Sandler <dsandler@android.com>
Wed, 3 Oct 2012 14:40:00 +0000 (10:40 -0400)
commite5f7ec0576a25abc7a9754c72d61d86a251347e2
tree87d6e16e1344202532e988bf036377ad753e0c57
parentf175525be4107649581259d04711f9ead905d447
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
packages/SystemUI/res/layout/quick_settings.xml
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsScrollView.java [new file with mode: 0644]