mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Bubble bar dismiss interaction
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 commit is contained in:
@@ -90,6 +90,8 @@ import com.android.launcher3.taskbar.bubbles.BubbleBarController;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleBarView;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleBarViewController;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleControllers;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleDismissController;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleDragController;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleStashController;
|
||||
import com.android.launcher3.taskbar.bubbles.BubbleStashedHandleViewController;
|
||||
import com.android.launcher3.taskbar.overlay.TaskbarOverlayController;
|
||||
@@ -216,7 +218,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
new BubbleBarController(this, bubbleBarView),
|
||||
new BubbleBarViewController(this, bubbleBarView),
|
||||
new BubbleStashController(this),
|
||||
new BubbleStashedHandleViewController(this, bubbleHandleView)));
|
||||
new BubbleStashedHandleViewController(this, bubbleHandleView),
|
||||
new BubbleDragController(this),
|
||||
new BubbleDismissController(this, mDragLayer)));
|
||||
}
|
||||
|
||||
// Construct controllers.
|
||||
|
||||
Reference in New Issue
Block a user