Loading packages/SystemUI/res/layout-land/global_actions_grid_item.xml +0 −10 Original line number Diff line number Diff line Loading @@ -57,15 +57,5 @@ android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> <TextView android:visibility="gone" android:id="@*android:id/status" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> </LinearLayout> packages/SystemUI/res/layout/global_actions_grid_item.xml +0 −10 Original line number Diff line number Diff line Loading @@ -56,15 +56,5 @@ android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> <TextView android:visibility="gone" android:id="@*android:id/status" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> </LinearLayout> packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −17 Original line number Diff line number Diff line Loading @@ -1166,13 +1166,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, 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(); if (!TextUtils.isEmpty(status)) { statusView.setText(status); } else { statusView.setVisibility(View.GONE); } if (mIcon != null) { icon.setImageDrawable(mIcon); icon.setScaleType(ScaleType.CENTER_CROP); Loading Loading @@ -1257,32 +1250,26 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, LayoutInflater inflater) { willCreate(); View v = inflater.inflate(R .layout.global_actions_item, parent, false); View v = inflater.inflate(com.android.systemui.R .layout.global_actions_grid_item, parent, false); ImageView icon = (ImageView) v.findViewById(R.id.icon); TextView messageView = (TextView) v.findViewById(R.id.message); TextView statusView = (TextView) v.findViewById(R.id.status); final boolean enabled = isEnabled(); boolean on = ((mState == State.On) || (mState == State.TurningOn)); if (messageView != null) { messageView.setText(mMessageResId); messageView.setText(on ? mEnabledStatusMessageResId : mDisabledStatusMessageResId); messageView.setEnabled(enabled); messageView.setSelected(true); // necessary for marquee to work } boolean on = ((mState == State.On) || (mState == State.TurningOn)); if (icon != null) { icon.setImageDrawable(context.getDrawable( (on ? mEnabledIconResId : mDisabledIconResid))); icon.setEnabled(enabled); } if (statusView != null) { statusView.setText(on ? mEnabledStatusMessageResId : mDisabledStatusMessageResId); statusView.setVisibility(View.VISIBLE); statusView.setEnabled(enabled); } v.setEnabled(enabled); return v; Loading Loading
packages/SystemUI/res/layout-land/global_actions_grid_item.xml +0 −10 Original line number Diff line number Diff line Loading @@ -57,15 +57,5 @@ android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> <TextView android:visibility="gone" android:id="@*android:id/status" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> </LinearLayout>
packages/SystemUI/res/layout/global_actions_grid_item.xml +0 −10 Original line number Diff line number Diff line Loading @@ -56,15 +56,5 @@ android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> <TextView android:visibility="gone" android:id="@*android:id/status" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="@color/global_actions_text" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> </LinearLayout>
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −17 Original line number Diff line number Diff line Loading @@ -1166,13 +1166,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, 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(); if (!TextUtils.isEmpty(status)) { statusView.setText(status); } else { statusView.setVisibility(View.GONE); } if (mIcon != null) { icon.setImageDrawable(mIcon); icon.setScaleType(ScaleType.CENTER_CROP); Loading Loading @@ -1257,32 +1250,26 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, LayoutInflater inflater) { willCreate(); View v = inflater.inflate(R .layout.global_actions_item, parent, false); View v = inflater.inflate(com.android.systemui.R .layout.global_actions_grid_item, parent, false); ImageView icon = (ImageView) v.findViewById(R.id.icon); TextView messageView = (TextView) v.findViewById(R.id.message); TextView statusView = (TextView) v.findViewById(R.id.status); final boolean enabled = isEnabled(); boolean on = ((mState == State.On) || (mState == State.TurningOn)); if (messageView != null) { messageView.setText(mMessageResId); messageView.setText(on ? mEnabledStatusMessageResId : mDisabledStatusMessageResId); messageView.setEnabled(enabled); messageView.setSelected(true); // necessary for marquee to work } boolean on = ((mState == State.On) || (mState == State.TurningOn)); if (icon != null) { icon.setImageDrawable(context.getDrawable( (on ? mEnabledIconResId : mDisabledIconResid))); icon.setEnabled(enabled); } if (statusView != null) { statusView.setText(on ? mEnabledStatusMessageResId : mDisabledStatusMessageResId); statusView.setVisibility(View.VISIBLE); statusView.setEnabled(enabled); } v.setEnabled(enabled); return v; Loading