diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-05-12 20:18:47 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-05-12 21:10:54 +0200 |
commit | db3e6ed4270061538908ecc577df6f6a0d17ada3 (patch) | |
tree | 0e5cfdaf2d5ac99fb335938c945b875d5e8d1eaa /packages/SystemUI/src | |
parent | fc1a824ec1453a84d9c53837df4ab93eca591a5f (diff) | |
download | frameworks_base-db3e6ed4270061538908ecc577df6f6a0d17ada3.zip frameworks_base-db3e6ed4270061538908ecc577df6f6a0d17ada3.tar.gz frameworks_base-db3e6ed4270061538908ecc577df6f6a0d17ada3.tar.bz2 |
Fix clipping and outline for top quick settings header.
Change-Id: I4b4d093d4c6abe120fc166b75e1bd96446027794
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java index 1af9a6b..5527473 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java @@ -18,6 +18,8 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.Intent; +import android.graphics.Outline; +import android.graphics.Rect; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; @@ -59,6 +61,9 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL private ActivityStarter mActivityStarter; private BrightnessController mBrightnessController; + private final Rect mClipBounds = new Rect(); + private final Outline mOutline = new Outline(); + public StatusBarHeaderView(Context context, AttributeSet attrs) { super(context, attrs); } @@ -193,6 +198,14 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL } else { mBackground.setTranslationY(0); } + setClipping(height); + } + + private void setClipping(float height) { + mClipBounds.set(getPaddingLeft(), 0, getWidth() - getPaddingRight(), (int) height); + setClipBounds(mClipBounds); + mOutline.setRect(mClipBounds); + setOutline(mOutline); } public View getBackgroundView() { |