diff options
| author | 2019-01-31 04:02:34 +0000 | |
|---|---|---|
| committer | 2019-01-31 04:02:34 +0000 | |
| commit | 930321a0c6800fd866bd5738964bebeed5e7279c (patch) | |
| tree | e0ad0f5d467d6d0a463f53dc1e97d269a0da7481 | |
| parent | ae645dc61b1cffa87f45b42dd0ac3dbc7a3d9e19 (diff) | |
| parent | dd49705c7c01ad5513ba8bb05b893b89c5185991 (diff) | |
Merge "Make the triangle match dark mode"
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java index 71ae1f8620f6..231e725057d0 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java @@ -19,6 +19,7 @@ package com.android.systemui.bubbles; import android.annotation.Nullable; import android.content.Context; import android.content.res.Resources; +import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.drawable.ShapeDrawable; import android.text.TextUtils; @@ -68,9 +69,15 @@ public class BubbleExpandedViewContainer extends LinearLayout { mPointerView = findViewById(R.id.pointer_view); int width = res.getDimensionPixelSize(R.dimen.bubble_pointer_width); int height = res.getDimensionPixelSize(R.dimen.bubble_pointer_height); + + TypedArray ta = getContext().obtainStyledAttributes( + new int[] {android.R.attr.colorBackgroundFloating}); + int bgColor = ta.getColor(0, Color.WHITE); + ta.recycle(); + ShapeDrawable triangleDrawable = new ShapeDrawable( TriangleShape.create(width, height, true /* pointUp */)); - triangleDrawable.setTint(Color.WHITE); // TODO: dark mode + triangleDrawable.setTint(bgColor); mPointerView.setBackground(triangleDrawable); mHeaderView = findViewById(R.id.bubble_content_header); } |