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

Commit 3f2d8b5d authored by Aaron Heuckroth's avatar Aaron Heuckroth
Browse files

Use marquee in Global Actions menu.

Fix centering on classic Global Actions menu.

Test: Automated tests pass. Set language to German (Belgien), and set screen size to the largest setting. Bug report string should scroll.

Fixes: 130031168
Fixes: 130031706

Change-Id: I4f873728edded9bc9eddc44a66ac84256a657741
parent dd07ae57
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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"
+2 −2
Original line number Diff line number Diff line
@@ -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"
+1 −1
Original line number Diff line number Diff line
@@ -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>

+3 −0
Original line number Diff line number Diff line
@@ -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));