diff options
| author | 2018-03-26 17:50:42 -0400 | |
|---|---|---|
| committer | 2018-03-26 17:57:39 -0400 | |
| commit | 3033099f81e5ab89207b4e29c36a6976b0dbb276 (patch) | |
| tree | a0dffe778a3adb5d629f5dcb882d1ba48dfc35c1 | |
| parent | 8eaee9eea5f970b2a45011151a6f6b74603ab3a5 (diff) | |
Show ripples for QS tiles and footer buttons.
- Add transparent background to both footer and panel
- Fix calculation for centering ripple animation for tiles
Change-Id: I22294888692446aea35cbc2b437f0c0b7ee20ac4
Fixes: 74581934
Test: visual
| -rw-r--r-- | packages/SystemUI/res/layout/qs_footer_impl.xml | 1 | ||||
| -rw-r--r-- | packages/SystemUI/res/layout/qs_panel.xml | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java | 14 |
3 files changed, 7 insertions, 10 deletions
diff --git a/packages/SystemUI/res/layout/qs_footer_impl.xml b/packages/SystemUI/res/layout/qs_footer_impl.xml index ea1ad2d102d1..ef18725ce7e3 100644 --- a/packages/SystemUI/res/layout/qs_footer_impl.xml +++ b/packages/SystemUI/res/layout/qs_footer_impl.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="@dimen/qs_footer_height" android:elevation="4dp" + android:background="@android:color/transparent" android:baselineAligned="false" android:clickable="false" android:clipChildren="false" diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml index 1c9ce18f1be0..72ff65333099 100644 --- a/packages/SystemUI/res/layout/qs_panel.xml +++ b/packages/SystemUI/res/layout/qs_panel.xml @@ -56,9 +56,9 @@ android:layout_height="wrap_content" android:layout_marginBottom="@dimen/qs_footer_height" android:elevation="4dp" + android:background="@android:color/transparent" /> - <include layout="@layout/quick_status_bar_expanded_header" /> <include layout="@layout/qs_footer_impl" /> diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java index c9c678c2ad25..a9defc8b75a0 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java @@ -15,7 +15,6 @@ package com.android.systemui.qs.tileimpl; import static com.android.systemui.qs.tileimpl.QSIconViewImpl.QS_ANIM_LENGTH; -import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.ColorStateList; @@ -122,14 +121,14 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { private void setRipple(RippleDrawable tileBackground) { mRipple = tileBackground; if (getWidth() != 0) { - updateRippleSize(getWidth(), getHeight()); + updateRippleSize(); } } - private void updateRippleSize(int width, int height) { + private void updateRippleSize() { // center the touch feedback on the center of the icon, and dial it down a bit - final int cx = width / 2; - final int cy = mIconFrame.getMeasuredHeight() / 2; + final int cx = mIconFrame.getMeasuredWidth() / 2 + mIconFrame.getLeft(); + final int cy = mIconFrame.getMeasuredHeight() / 2 + mIconFrame.getTop(); final int rad = (int) (mIcon.getHeight() * .85f); mRipple.setHotspotBounds(cx - rad, cy - rad, cx + rad, cy + rad); } @@ -151,11 +150,8 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); - final int w = getMeasuredWidth(); - final int h = getMeasuredHeight(); - if (mRipple != null) { - updateRippleSize(w, h); + updateRippleSize(); } } |