Merge "Use marquee in Global Actions menu. Fix centering on classic Global Actions menu." into qt-dev

This commit is contained in:
Aaron Heuckroth
2019-04-08 14:20:58 +00:00
committed by Android (Google) Code Review
4 changed files with 9 additions and 3 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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));