Files
frameworks_base/packages/SystemUI/res/layout/bubble_overflow_button.xml
Lyn Han cd4f87efbb Better overflow button
Overflow button as BadgedImageView
- BadgedImageView uses launcher’s icon factory to render overflow icon, which fixes the size and space inconsistencies between real bubbles and a bare ImageView
- BadgedImageView gives us access to the existing dot drawing logic, which we can later use to draw a dot on overflow button when overflow bubbles get updates
- Replace Bubble with BubbleViewProvider inside BadgedImageView so that BadgedImageView can access BubbleOverflow’s dot info

UI polish
- Set margins for overflow bubbles
- Set padding for overflow empty state
- Set overflow button and dot color to accent color from theme
- Render overflow button based on theme and dark mode; update on change

Bug: 149146374
Bug: 148878911
Test: manual - overflow button shape, icon color updates on theme change
Test: manual - overflow button color updates on dark mode change
Test: manual - overflow UI looks like mocks (specs not final)
Test: atest SystemUITests
Change-Id: I3d8829d56bce5c80936698a038438aff6db42d0f
2020-02-20 19:35:26 -08:00

23 lines
1005 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 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
-->
<com.android.systemui.bubbles.BadgedImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble_overflow_button"
android:layout_width="@dimen/individual_bubble_size"
android:layout_height="@dimen/individual_bubble_size"
android:src="@drawable/ic_bubble_overflow_button"/>