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

Commit ba35a775 authored by Mady Mellor's avatar Mady Mellor
Browse files

Updates to manage button based on latest mocks

- manage button should be inset from the expanded view edge
  but the menu should be flush with expanded view edge.
- button size is smaller (36dp instead of 40dp)
- more padding (16dp above / below on both tablet & phone)
- diff colour N1-800 instead of N1-900

Test: visual 1 - expand a bubble and look at 'manage' button
             2 - tap on the button and look at the menu
             3 - do 1 & 2 on tablet & in RTL & on phone
                 landscape
Bug: 183658858
Change-Id: I4b5ffc26602b72ee28d26476fc222df3e2e1e80b
parent 93be1fb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid
        android:color="@android:color/system_neutral1_900"
        android:color="@android:color/system_neutral1_800"
        />
    <corners android:radius="20dp" />

+4 −3
Original line number Diff line number Diff line
@@ -20,9 +20,10 @@
    android:id="@+id/settings_button"
    android:layout_gravity="start"
    android:layout_width="wrap_content"
    android:layout_height="40dp"
    android:layout_marginTop="8dp"
    android:layout_marginBottom="8dp"
    android:layout_height="@dimen/bubble_manage_button_height"
    android:layout_marginStart="@dimen/bubble_manage_button_margin"
    android:layout_marginTop="@dimen/bubble_manage_button_margin"
    android:layout_marginBottom="@dimen/bubble_manage_button_margin"
    android:focusable="true"
    android:text="@string/manage_bubbles_text"
    android:textSize="@*android:dimen/text_size_body_2_material"
+5 −1
Original line number Diff line number Diff line
@@ -149,7 +149,11 @@
    <!-- Extra padding around the dismiss target for bubbles -->
    <dimen name="bubble_dismiss_slop">16dp</dimen>
    <!-- Height of button allowing users to adjust settings for bubbles. -->
    <dimen name="bubble_manage_button_height">56dp</dimen>
    <dimen name="bubble_manage_button_height">36dp</dimen>
    <!-- Height of manage button including margins. -->
    <dimen name="bubble_manage_button_total_height">68dp</dimen>
    <!-- The margin around the outside of the manage button. -->
    <dimen name="bubble_manage_button_margin">16dp</dimen>
    <!-- Height of an item in the bubble manage menu. -->
    <dimen name="bubble_menu_item_height">60dp</dimen>
    <!-- Padding applied to the bubble manage menu. -->
+4 −0
Original line number Diff line number Diff line
@@ -735,6 +735,10 @@ public class BubbleExpandedView extends LinearLayout {
        mManageButton.getBoundsOnScreen(rect);
    }

    public int getManageButtonMargin() {
        return ((LinearLayout.LayoutParams) mManageButton.getLayoutParams()).getMarginStart();
    }

    /**
     * Cleans up anything related to the task and {@code TaskView}. If this view should be reused
     * after this method is called, then
+1 −3
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ public class BubblePositioner {
    private int mPointerMargin;
    private int mPointerWidth;
    private int mPointerHeight;
    private int mPointerOverlap;
    private int mManageButtonHeight;
    private int mExpandedViewMinHeight;
    private int mOverflowHeight;
@@ -166,8 +165,7 @@ public class BubblePositioner {
        mPointerWidth = res.getDimensionPixelSize(R.dimen.bubble_pointer_width);
        mPointerHeight = res.getDimensionPixelSize(R.dimen.bubble_pointer_height);
        mPointerMargin = res.getDimensionPixelSize(R.dimen.bubble_pointer_margin);
        mPointerOverlap = res.getDimensionPixelSize(R.dimen.bubble_pointer_overlap);
        mManageButtonHeight = res.getDimensionPixelSize(R.dimen.bubble_manage_button_height);
        mManageButtonHeight = res.getDimensionPixelSize(R.dimen.bubble_manage_button_total_height);
        mExpandedViewMinHeight = res.getDimensionPixelSize(R.dimen.bubble_expanded_default_height);
        mOverflowHeight = res.getDimensionPixelSize(R.dimen.bubble_overflow_height);

Loading