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
This commit is contained in:
@@ -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" />
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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. -->
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -2548,7 +2548,6 @@ public class BubbleStackView extends FrameLayout
|
||||
R.string.bubbles_app_settings, bubble.getAppName()));
|
||||
}
|
||||
|
||||
mExpandedBubble.getExpandedView().getManageButtonBoundsOnScreen(mTempRect);
|
||||
if (mExpandedBubble.getExpandedView().getTaskView() != null) {
|
||||
mExpandedBubble.getExpandedView().getTaskView().setObscuredTouchRect(mShowingManage
|
||||
? new Rect(0, 0, getWidth(), getHeight())
|
||||
@@ -2560,7 +2559,11 @@ public class BubbleStackView extends FrameLayout
|
||||
|
||||
// When the menu is open, it should be at these coordinates. The menu pops out to the right
|
||||
// in LTR and to the left in RTL.
|
||||
final float targetX = isLtr ? mTempRect.left : mTempRect.right - mManageMenu.getWidth();
|
||||
mExpandedBubble.getExpandedView().getManageButtonBoundsOnScreen(mTempRect);
|
||||
final float margin = mExpandedBubble.getExpandedView().getManageButtonMargin();
|
||||
final float targetX = isLtr
|
||||
? mTempRect.left - margin
|
||||
: mTempRect.right + margin - mManageMenu.getWidth();
|
||||
final float targetY = mTempRect.bottom - mManageMenu.getHeight();
|
||||
|
||||
final float xOffsetForAnimation = (isLtr ? 1 : -1) * mManageMenu.getWidth() / 4f;
|
||||
|
||||
Reference in New Issue
Block a user