Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86aee184 authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Expanded view handle should be the size of the dots" into main

parents 9b7d0171 dcf9b9d7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -23,7 +23,8 @@

    <com.android.wm.shell.bubbles.bar.BubbleBarHandleView
        android:id="@+id/bubble_bar_handle_view"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content" />
        android:layout_height="@dimen/bubble_bar_expanded_view_caption_height"
        android:layout_width="@dimen/bubble_bar_expanded_view_caption_width"
        android:layout_gravity="top|center_horizontal" />

</com.android.wm.shell.bubbles.bar.BubbleBarExpandedView>
+2 −0
Original line number Diff line number Diff line
@@ -244,6 +244,8 @@
    <dimen name="bubble_popup_padding">24dp</dimen>
    <!-- The size of the caption bar inset at the top of bubble bar expanded view. -->
    <dimen name="bubble_bar_expanded_view_caption_height">32dp</dimen>
    <!-- The width of the caption bar at the top of bubble bar expanded view. -->
    <dimen name="bubble_bar_expanded_view_caption_width">128dp</dimen>
    <!-- The height of the dots shown for the caption menu in the bubble bar expanded view.. -->
    <dimen name="bubble_bar_expanded_view_caption_dot_size">4dp</dimen>
    <!-- The spacing between the dots for the caption menu in the bubble bar expanded view.. -->
+3 −8
Original line number Diff line number Diff line
@@ -143,6 +143,8 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
                outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), mCurrentCornerRadius);
            }
        });
        // Set a touch sink to ensure that clicks on the caption area do not propagate to the parent
        setOnTouchListener((v, event) -> true);
    }

    @Override
@@ -245,12 +247,8 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        int height = MeasureSpec.getSize(heightMeasureSpec);
        int menuViewHeight = Math.min(mCaptionHeight, height);
        measureChild(mHandleView, widthMeasureSpec, MeasureSpec.makeMeasureSpec(menuViewHeight,
                MeasureSpec.getMode(heightMeasureSpec)));

        if (mTaskView != null) {
            int height = MeasureSpec.getSize(heightMeasureSpec);
            measureChild(mTaskView, widthMeasureSpec, MeasureSpec.makeMeasureSpec(height,
                    MeasureSpec.getMode(heightMeasureSpec)));
        }
@@ -259,14 +257,11 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);
        final int captionBottom = t + mCaptionHeight;
        if (mTaskView != null) {
            mTaskView.layout(l, t, r,
                    t + mTaskView.getMeasuredHeight());
            mTaskView.setCaptionInsets(Insets.of(0, mCaptionHeight, 0, 0));
        }
        // Handle draws on top of task view in the caption area.
        mHandleView.layout(l, t, r, captionBottom);
    }

    @Override
+1 −0
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ public class BubbleBarLayerView extends FrameLayout
            // Touch delegate for the menu
            BubbleBarHandleView view = mExpandedView.getHandleView();
            view.getBoundsOnScreen(mHandleTouchBounds);
            // Move top value up to ensure touch target is large enough
            mHandleTouchBounds.top -= mPositioner.getBubblePaddingTop();
            mHandleTouchDelegate = new TouchDelegate(mHandleTouchBounds,
                    mExpandedView.getHandleView());