From 40fdc4ace9bc69a45a37782b6d394005f917b41a Mon Sep 17 00:00:00 2001 From: Roman Birg Date: Mon, 30 Nov 2015 23:11:10 -0800 Subject: SystemUI: various qs tile detail improvements - Handle top padding inside QSDragPanel, so the detail clipping animation doesn't get cut off by the top padding. - Increase bottom padding of the QSContainer to give some more breathing room for the circle page indicator. - Disable pager overscrolling - Add dual tile carrot indicators to cast, dnd, and mobile data tiles Change-Id: I81f56760140a2d7dd31e25b23f477eb1be0af305 Signed-off-by: Roman Birg --- packages/SystemUI/res/layout/qs_panel.xml | 3 +- .../src/com/android/systemui/qs/QSContainer.java | 2 +- .../com/android/systemui/qs/QSDetailClipper.java | 4 +++ .../src/com/android/systemui/qs/QSDragPanel.java | 35 ++++++++++++++++++---- .../src/com/android/systemui/qs/QSPage.java | 5 ++++ .../src/com/android/systemui/qs/QSPanel.java | 4 +-- .../src/com/android/systemui/qs/QSViewPager.java | 5 ++++ .../com/android/systemui/qs/tiles/CastTile.java | 10 +++++++ .../android/systemui/qs/tiles/CellularTile.java | 10 +++++++ .../src/com/android/systemui/qs/tiles/DndTile.java | 10 +++++++ 10 files changed, 77 insertions(+), 11 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml index c3d3c3e..9df4425 100644 --- a/packages/SystemUI/res/layout/qs_panel.xml +++ b/packages/SystemUI/res/layout/qs_panel.xml @@ -19,8 +19,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/qs_background_primary" - android:paddingTop="8dp" - android:paddingBottom="8dp" + android:paddingBottom="12dp" android:elevation="2dp"> { } @Override + protected void handleSecondaryClick() { + handleClick(); + } + + @Override protected void handleLongClick() { mHost.startActivityDismissingKeyguard(CAST_SETTINGS); } @@ -135,6 +140,11 @@ public class CastTile extends QSTile { return null; } + @Override + public boolean hasDualTargetsDetails() { + return true; + } + private String getDeviceName(CastDevice device) { return device.name != null ? device.name : mContext.getString(R.string.quick_settings_cast_device_default_name); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index 91e92c8..c99d70a 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -102,6 +102,11 @@ public class CellularTile extends QSTile { } @Override + protected void handleSecondaryClick() { + handleClick(); + } + + @Override protected void handleLongClick() { if (mTelephonyManager.getDefault().getPhoneCount() > 1) { mHost.startActivityDismissingKeyguard(MOBILE_NETWORK_SETTINGS_MSIM); @@ -153,6 +158,11 @@ public class CellularTile extends QSTile { return MetricsLogger.QS_CELLULAR; } + @Override + public boolean hasDualTargetsDetails() { + return true; + } + // Remove the period from the network name public static String removeTrailingPeriod(String string) { if (string == null) return null; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java index ccf9887..afe42b9 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java @@ -122,6 +122,11 @@ public class DndTile extends QSTile { } @Override + protected void handleSecondaryClick() { + handleClick(); + } + + @Override public void handleLongClick() { mHost.startActivityDismissingKeyguard(ZEN_SETTINGS); } @@ -194,6 +199,11 @@ public class DndTile extends QSTile { } } + @Override + public boolean hasDualTargetsDetails() { + return true; + } + private final OnSharedPreferenceChangeListener mPrefListener = new OnSharedPreferenceChangeListener() { @Override -- cgit v1.1