When the bubble bar is collapsed we now show at most 2 bubbles.
Fixes: 295020145
Test: Manual
- Add 1 bubble to the bubble bar
- Collapse bubble bar
-- Observe that only that bubble is visible
- Expand the bubble bar
-- Observe that both that bubble and the overflow are visible
- Add another bubble
-- Observe that 2 bubbles are visible when collapsed
- Add another bubble
-- Observe that only the first 2 bubbles are visible when collapsed
Change-Id: I5f534f53eefe9a920b8b3258813d67d021c5f2a8
A single bubble and the bubble stack dismiss functionality is implemented using `BubbleDragController`. It attaches a touch listener to the corresponding views and handles gesture interactions.
* When the view is long clicked the dragging to dismiss interaction starts. It scales up the dragged view and presents the dismiss view in the bottom of the window.
* When the bubble or the bubble stack is dragged close to the dismiss target area, it gets pulled towards it and sticks to it. The `MagnetizedObject` and `MagneticTarget` classes are used for it.
* When the dragged view is released outside of the dismiss area, it moves back to the initial position with animation.
* When the dragged bubble is released inside of the dismiss area, it will dismiss the bubble with animation and remove it from the stack.
* When the dragged bubble bar stack is released inside the dismiss area, all the bubbles will get dismissed and the bubble bar will dissapear.
Bug: 271466616
Test: manual, TBD
Flag: WM_BUBBLE_BAR
Change-Id: I83393898be61ec522db92688ac2e111ef7d72fe6
This avoids re-adding bubbles that have already been removed
after dismissing multiple bubbles at once.
Fixes: 291738088
Test: Manual
- Add 2 bubbles A and B to the bubble bar
- Expand the bubble bar
- Tap 3 dot menu and dismiss
- Repeat for the next bubble
- Observe that bubble bar is gone
- Add a new bubble C
- Observe that the bubble bar contains only bubble C
Change-Id: Id53811a103d245647489ab8d442cbb2004e0e700
* Added dismiss view to the taskbar
* Bubble drag to dismiss of:
* A single bubble when the bubble bar stack is expanded
* All bubbles when the bubble bar stack is colapsed
* Added dismiss related calls to WMShell in SystemUI through SystemUIProxy
Bug: 271466616
Test: manual, TBD
Flag: WM_BUBBLE_BAR
Change-Id: Ibb62a0b1ab9fafa8a3acf07450ce2132ed605adc
Updates BubbleView to include logic to render the update dot on a
bubble. This only shows for BubbleBarBubbles, not the overflow.
We only show the dot (and the badge) when:
- the bubble has new content / appropriate flags set
- AND the bubbles are expanded
OR on the first bubble when bubbles are collapsed
- AND when the flyout is not animating (this bit doesn't exist yet)
If a bubble has a dot and is opened, the dot will animate away.
To do this, we update the flags set on a bubble.
The flag needs to be set on WMShell side as well as Launcher side.
When a bubble is shown by WMShell, it automatically updates the flag.
This CL adds code to update the flag on Launcher side when we call
into WMShell to show the bubble.
Test: manual
Bug: 269670235
Change-Id: I32f652effa9a73c567981aa5a2a5864e9c3c0c66
This allows WMShell to calculate the position of the expanded view
correctly when the bubble bar is being expanded from stashed.
Test: See ag/24012908
Change-Id: I7b917e761c827135942d918917c920b06650f496
This is an initial change that positions the bubble bar aligning it
with the center of the hotseat icons. We still need to center it
with the taskbar when in overview.
This change also fixes the touch issues where sometimes the hotseat
icons don't respond to taps. The fix is twofold:
1. Make sure that taskbar insets are always updated when
BubbleStashController#setBubblesShowingOnHome is called.
2. Update the touchable region in TaskbarInsetsController to account
for the Y translation of the bubble bar bounds when the bubble
bar is visible.
Demo: https://screenshot.googleplex.com/6NRyu2CR7Bjs32x
Bug: 286247080
Test: Manual on a physical device
Change-Id: I00daff8341e4d8f5d141b5e0220726f6c03b437c
After the bubble bar collapsing animation completes, and reordering
is finished, if the bubble overflow is selected, update the selected
bubble to be the first bubble. This ensures that the overflow
is not selected the next time the bubble bar is expanded.
This is done through a callback from the BubbleBarView to the
BubbleBarController with the key of the first bubble. Ideally the view
would just notify that the selected bubble needs to be updated, but
the controller doesn't hold ordering info.
Fixes: 289280431
Test: manual
- Add 2 bubbles to the bubble bar
- Expand the bubble bar. The first bubble A should be selected
- Select the second bubble B
- Select the overflow
- Tap on the overflow again to collapse the bubble bar
- Tap on the bubble bar to expand it
- Observe that bubble B is first and selected
Change-Id: I0f9c2d628cfaf3a80da55ff634284687425e949a
* changes:
Fade the bubble bar arrow in and out when the bubble bar expands and collapses.
Animate the bubble bar width and the bubbles within it as it expands and collapses.
When a new bubble is added to the bar and we're over the limit
remove the second to last bubble instead of the overflow.
This change also updates the key of the overflow bubble to
match the one in wmshell.
Bug: 287121592
Test: manual - Add 6 bubbles to the bubble bar
- The overflow bubble should still be there
Change-Id: Ibd3ab73be5d3afb49f771a1925ebda2c45b55136
Creates BubbleBarController which is responsible for registering
a listener to hear about bubble state changes and propagates those
changes to BubbleBarViewController.
Additionally, it loads the data and creates the individual BubbleViews
that are added to BubbleBarView.
Bug: 253318833
Test: manual, with other CLs, see go/bubble-bar-tests
Flag: WM_BUBBLE_BAR
Change-Id: I45b0d3a764cd14b2fc5d34aec2b81c7fecb541cf
BubbleBarView shows BubbleViews in a bar similar to transient
taskbar. BubbleBarView can be collapsed (bubbles in a stack) or
expanded (bubbles all visible). When expanded, WMShell will be
notified to show the appropriate expanded bubble view (not part of
this CL).
Also creates BubbleControllers which contains BubbleBarViewController
and will eventually contain other controllers related to stashing
for the bubble bar.
Bug: 253318833
Test: manual, with other CLs, see go/bubble-bar-tests
Flag: WM_BUBBLE_BAR
Change-Id: I990ab3da6614db90ffff8c40281dc7f16b3957f6