Create container view for bubble bar

The container will be used to inflate the bubble bar flyout view

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: builds successfully -- code is not wired up yet

Change-Id: I3012caa801c73f9e13f26c8803595b59e250ae1e
This commit is contained in:
Liran Binyamin committed 2024-10-09 11:09:48 -04:00
1 parent 98ecad0352
commit c25aa0c20f
5 files changed
+63 -39

No files matched your search

+20 -14
View File
@@ -51,20 +51,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_gravity="bottom|end"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:paddingEnd="@dimen/taskbar_icon_spacing"
android:paddingStart="@dimen/taskbar_icon_spacing"
android:visibility="gone"
android:gravity="center"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation"
/>
<FrameLayout
android:id="@+id/taskbar_bubbles_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false">
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_gravity="bottom|end"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:paddingEnd="@dimen/taskbar_icon_spacing"
android:paddingStart="@dimen/taskbar_icon_spacing"
android:visibility="gone"
android:gravity="center"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation" />
</FrameLayout>
<com.android.launcher3.taskbar.navbutton.NearestTouchFrame
android:id="@+id/navbuttons_view"
+18 -11
View File
@@ -35,17 +35,24 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:visibility="gone"
android:gravity="center"
android:layout_gravity="bottom"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation" />
<FrameLayout
android:id="@+id/taskbar_bubbles_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false">
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:visibility="gone"
android:gravity="center"
android:layout_gravity="bottom"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation" />
</FrameLayout>
<com.android.launcher3.taskbar.navbutton.NearestTouchFrame
android:id="@+id/navbuttons_view"
+18 -12
View File
@@ -38,18 +38,24 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_gravity="bottom|end"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:visibility="gone"
android:gravity="center"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation"
/>
<FrameLayout
android:id="@+id/taskbar_bubbles_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false">
<com.android.launcher3.taskbar.bubbles.BubbleBarView
android:id="@+id/taskbar_bubbles"
android:layout_width="wrap_content"
android:layout_height="@dimen/bubblebar_size_with_pointer"
android:layout_gravity="bottom|end"
android:layout_marginHorizontal="@dimen/transient_taskbar_bottom_margin"
android:paddingTop="@dimen/bubblebar_pointer_visible_size"
android:visibility="gone"
android:gravity="center"
android:clipChildren="false"
android:elevation="@dimen/bubblebar_elevation" />
</FrameLayout>
<com.android.launcher3.taskbar.navbutton.NearestTouchFrame
android:id="@+id/navbuttons_view"
@@ -71,6 +71,7 @@ import android.view.Surface;
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.Toast;
import android.window.RemoteTransition;
@@ -268,8 +269,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
NearestTouchFrame navButtonsView = mDragLayer.findViewById(R.id.navbuttons_view);
StashedHandleView stashedHandleView = mDragLayer.findViewById(R.id.stashed_handle);
BubbleBarView bubbleBarView = null;
FrameLayout bubbleBarContainer = null;
if (isTransientTaskbar || Flags.enableBubbleBarInPersistentTaskBar()) {
bubbleBarView = mDragLayer.findViewById(R.id.taskbar_bubbles);
bubbleBarContainer = mDragLayer.findViewById(R.id.taskbar_bubbles_container);
}
StashedHandleView bubbleHandleView = mDragLayer.findViewById(R.id.stashed_bubble_handle);
@@ -296,7 +299,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
: new PersistentBubbleStashController(dimensionsProvider);
bubbleControllersOptional = Optional.of(new BubbleControllers(
new BubbleBarController(this, bubbleBarView),
new BubbleBarViewController(this, bubbleBarView),
new BubbleBarViewController(this, bubbleBarView, bubbleBarContainer),
bubbleStashController,
bubbleHandleController,
new BubbleDragController(this),
@@ -29,6 +29,7 @@ import android.util.Log;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -122,7 +123,8 @@ public class BubbleBarViewController {
@Nullable
private BubbleBarBoundsChangeListener mBoundsChangeListener;
public BubbleBarViewController(TaskbarActivityContext activity, BubbleBarView barView) {
public BubbleBarViewController(TaskbarActivityContext activity, BubbleBarView barView,
FrameLayout bubbleBarContainer) {
mActivity = activity;
mBarView = barView;
mSystemUiProxy = SystemUiProxy.INSTANCE.get(mActivity);