diff options
| author | 2019-04-08 14:20:58 +0000 | |
|---|---|---|
| committer | 2019-04-08 14:20:58 +0000 | |
| commit | cb1536862860fb4fe58e3c19b4a230f32290e678 (patch) | |
| tree | c893007371fb154c279b61ade7346621e3b45826 | |
| parent | 06db71ad7c4b24e69af335047b245f0c374975f0 (diff) | |
| parent | 3f2d8b5df830ffc5974db1037e639a6f4f99d198 (diff) | |
Merge "Use marquee in Global Actions menu. Fix centering on classic Global Actions menu." into qt-dev
4 files changed, 9 insertions, 3 deletions
diff --git a/packages/SystemUI/res/layout/global_actions_grid_item.xml b/packages/SystemUI/res/layout/global_actions_grid_item.xml index 999c7b8c34b3..e92ec0f75fc1 100644 --- a/packages/SystemUI/res/layout/global_actions_grid_item.xml +++ b/packages/SystemUI/res/layout/global_actions_grid_item.xml @@ -43,6 +43,9 @@ android:id="@*android:id/message" android:layout_width="match_parent" android:layout_height="wrap_content" + android:ellipsize="marquee" + android:marqueeRepeatLimit="marquee_forever" + android:singleLine="true" android:gravity="center" android:textSize="12dp" android:textAppearance="?android:attr/textAppearanceSmall" diff --git a/packages/SystemUI/res/layout/global_actions_wrapped.xml b/packages/SystemUI/res/layout/global_actions_wrapped.xml index f932303473bd..d4410702a7d1 100644 --- a/packages/SystemUI/res/layout/global_actions_wrapped.xml +++ b/packages/SystemUI/res/layout/global_actions_wrapped.xml @@ -15,7 +15,7 @@ <!-- Global actions is right-aligned to be physically near power button --> <LinearLayout android:id="@android:id/list" - android:layout_width="@dimen/global_actions_panel_width" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:gravity="center" @@ -26,7 +26,7 @@ <!-- For separated button--> <FrameLayout android:id="@+id/separated_button" - android:layout_width="@dimen/global_actions_panel_width" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|right" android:layout_marginTop="6dp" diff --git a/packages/SystemUI/res/values-sw410dp/dimens.xml b/packages/SystemUI/res/values-sw410dp/dimens.xml index 73d1857c0063..fea1ef11e139 100644 --- a/packages/SystemUI/res/values-sw410dp/dimens.xml +++ b/packages/SystemUI/res/values-sw410dp/dimens.xml @@ -35,7 +35,7 @@ <dimen name="global_actions_grid_item_icon_width">24dp</dimen> <dimen name="global_actions_grid_item_icon_height">24dp</dimen> - <dimen name="global_actions_grid_item_icon_top_margin">14dp</dimen> + <dimen name="global_actions_grid_item_icon_top_margin">18dp</dimen> <dimen name="global_actions_grid_item_icon_side_margin">24dp</dimen> <dimen name="global_actions_grid_item_icon_bottom_margin">4dp</dimen> diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java index e22b24e2ed46..7a3f3bef8f5e 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java @@ -505,6 +505,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } TextView messageView = v.findViewById(R.id.message); messageView.setTextColor(textColor); + messageView.setSelected(true); // necessary for marquee to work ImageView icon = (ImageView) v.findViewById(R.id.icon); icon.getDrawable().setTint(textColor); return v; @@ -1137,6 +1138,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, ImageView icon = (ImageView) v.findViewById(R.id.icon); TextView messageView = (TextView) v.findViewById(R.id.message); + messageView.setSelected(true); // necessary for marquee to work TextView statusView = (TextView) v.findViewById(R.id.status); final String status = getStatus(); @@ -1240,6 +1242,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, if (messageView != null) { messageView.setText(mMessageResId); messageView.setEnabled(enabled); + messageView.setSelected(true); // necessary for marquee to work } boolean on = ((mState == State.On) || (mState == State.TurningOn)); |