Merge "Use marquee in Global Actions menu. Fix centering on classic Global Actions menu." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb15368628
@@ -43,6 +43,9 @@
|
|||||||
android:id="@*android:id/message"
|
android:id="@*android:id/message"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:singleLine="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="12dp"
|
android:textSize="12dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<!-- Global actions is right-aligned to be physically near power button -->
|
<!-- Global actions is right-aligned to be physically near power button -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@android:id/list"
|
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_height="wrap_content"
|
||||||
android:layout_gravity="top|right"
|
android:layout_gravity="top|right"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<!-- For separated button-->
|
<!-- For separated button-->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/separated_button"
|
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_height="wrap_content"
|
||||||
android:layout_gravity="top|right"
|
android:layout_gravity="top|right"
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<dimen name="global_actions_grid_item_icon_width">24dp</dimen>
|
<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_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_side_margin">24dp</dimen>
|
||||||
<dimen name="global_actions_grid_item_icon_bottom_margin">4dp</dimen>
|
<dimen name="global_actions_grid_item_icon_bottom_margin">4dp</dimen>
|
||||||
|
|
||||||
|
|||||||
@@ -505,6 +505,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
|||||||
}
|
}
|
||||||
TextView messageView = v.findViewById(R.id.message);
|
TextView messageView = v.findViewById(R.id.message);
|
||||||
messageView.setTextColor(textColor);
|
messageView.setTextColor(textColor);
|
||||||
|
messageView.setSelected(true); // necessary for marquee to work
|
||||||
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
icon.getDrawable().setTint(textColor);
|
icon.getDrawable().setTint(textColor);
|
||||||
return v;
|
return v;
|
||||||
@@ -1137,6 +1138,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
|||||||
|
|
||||||
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
TextView messageView = (TextView) v.findViewById(R.id.message);
|
TextView messageView = (TextView) v.findViewById(R.id.message);
|
||||||
|
messageView.setSelected(true); // necessary for marquee to work
|
||||||
|
|
||||||
TextView statusView = (TextView) v.findViewById(R.id.status);
|
TextView statusView = (TextView) v.findViewById(R.id.status);
|
||||||
final String status = getStatus();
|
final String status = getStatus();
|
||||||
@@ -1240,6 +1242,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
|
|||||||
if (messageView != null) {
|
if (messageView != null) {
|
||||||
messageView.setText(mMessageResId);
|
messageView.setText(mMessageResId);
|
||||||
messageView.setEnabled(enabled);
|
messageView.setEnabled(enabled);
|
||||||
|
messageView.setSelected(true); // necessary for marquee to work
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean on = ((mState == State.On) || (mState == State.TurningOn));
|
boolean on = ((mState == State.On) || (mState == State.TurningOn));
|
||||||
|
|||||||
Reference in New Issue
Block a user