Files
frameworks_base/packages/SystemUI/res/layout/bubble_overflow_button.xml
Lyn Han b58c7568d2 Bubble overflow - core functionality
BubbleStackView
- create show-overflow-button
- create expanded view to show overflow activity

BubbleOverflowActivity
- add adapter for recycler view of BadgedImageViews
- select bubble to promote it out of overflow, to first bubble in row

BubbleExpandedView
- create overflow intent
- add null bubble checks for overflow expanded view

BubbleData
- new list: overflow bubbles
- only repack bubbles in row (leave overflow order alone)
- update sortKey() to account for last access in addition to last
update. When users select a bubble to promote it out of overflow, it
counts as one access (instead of update); if sortKey does not check last
accessed time, the order is lost in the next repacking and the bubble goes
back to overflow.
- remove oldest bubbles if overflow bubble count > 16

BubbleController
- add callback that updates overflow activity when data changes
- allow overflow activity to set callback
- add/remove bubbles from bubble row ui

BadgedImageView
- set update() param to bubble only
- save other params in Bubble.java so that overflow can update
BadgedImageView with just a bubble

Bug: 138116789
Fixes: 148232991
Fixes: 148232992
Test: (manual) add 5+ bubbles: show-overflow-button shows in bubble row
Test: (manual) tap show-overflow-button: overflow shows aged out bubbles
Test: (manual) remove bubbles, count <= 5: overflow button hides
Test: (manual) tap bubble in overflow: bubble promoted to left of top row
Test: atest SystemUITests

Change-Id: I020ee4c9e16b236043c5cc244e610725e86bcc37
2020-01-23 22:42:16 -08:00

25 lines
1.0 KiB
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
-->
<ImageView
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"
android:scaleType="center"
android:layout_gravity="end"/>