Update the manage button to the new style
Also fixes a bug where the overflow view would still leave space
for the manage button even though we don't show something there.
Bug: 183658858
Test: manual - open a bubble and observe the manage button, should
be on a dark background with light text regardless
of light / dark theme.
Change-Id: Ie3f67ccd26ad4d75a3ed21a3dee43e2f74d07022
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2021 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="@android:color/system_neutral1_900"
|
||||
/>
|
||||
<corners android:radius="20dp" />
|
||||
|
||||
<padding
|
||||
android:left="20dp"
|
||||
android:right="20dp">
|
||||
</padding>
|
||||
|
||||
</shape>
|
||||
@@ -28,15 +28,18 @@
|
||||
/>
|
||||
|
||||
<com.android.wm.shell.common.AlphaOptimizedButton
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
android:id="@+id/settings_button"
|
||||
android:layout_gravity="start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:focusable="true"
|
||||
android:text="@string/manage_bubbles_text"
|
||||
android:textSize="@*android:dimen/text_size_body_2_material"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:background="@drawable/bubble_manage_btn_bg"
|
||||
android:textColor="@*android:color/system_neutral1_50"
|
||||
/>
|
||||
|
||||
</com.android.wm.shell.bubbles.BubbleExpandedView>
|
||||
|
||||
@@ -651,11 +651,12 @@ public class BubbleExpandedView extends LinearLayout {
|
||||
// Remove top insets back here because availableRect.height would account for that
|
||||
? mExpandedViewContainerLocation[1] - mPositioner.getInsets().top
|
||||
: 0;
|
||||
int settingsHeight = mIsOverflow ? 0 : mSettingsIconHeight;
|
||||
return mPositioner.getAvailableRect().height()
|
||||
- expandedContainerY
|
||||
- getPaddingTop()
|
||||
- getPaddingBottom()
|
||||
- mSettingsIconHeight
|
||||
- settingsHeight
|
||||
- mPointerHeight
|
||||
- mPointerMargin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user