diff options
author | John Spurlock <jspurlock@google.com> | 2015-06-03 13:24:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-03 13:24:44 +0000 |
commit | e7f68c18bf1a1da5d0aa129674fe4f9ecf06ac8c (patch) | |
tree | e89e14a435e6f386802241e1f213f658c00bc556 /packages | |
parent | e247cdec6db549035b67bb21fa08a4c6c73897d3 (diff) | |
parent | 023544f762a835fa903088cb38abda31aa09bed5 (diff) | |
download | frameworks_base-e7f68c18bf1a1da5d0aa129674fe4f9ecf06ac8c.zip frameworks_base-e7f68c18bf1a1da5d0aa129674fe4f9ecf06ac8c.tar.gz frameworks_base-e7f68c18bf1a1da5d0aa129674fe4f9ecf06ac8c.tar.bz2 |
Merge "Volume footer uglification." into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/layout/volume_zen_footer.xml | 32 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java | 8 |
2 files changed, 26 insertions, 14 deletions
diff --git a/packages/SystemUI/res/layout/volume_zen_footer.xml b/packages/SystemUI/res/layout/volume_zen_footer.xml index eede804..28447d7 100644 --- a/packages/SystemUI/res/layout/volume_zen_footer.xml +++ b/packages/SystemUI/res/layout/volume_zen_footer.xml @@ -24,7 +24,7 @@ android:id="@+id/zen_embedded_divider" android:layout_width="match_parent" android:layout_height="1dp" - android:layout_marginBottom="8dp" + android:layout_marginBottom="12dp" android:layout_marginTop="8dp" android:background="@color/qs_tile_divider" /> @@ -53,26 +53,34 @@ android:id="@+id/volume_zen_summary_line_1" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textDirection="locale" android:textAppearance="@style/TextAppearance.Volume.ZenSummary" /> <TextView android:id="@+id/volume_zen_summary_line_2" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginTop="1dp" + android:textDirection="locale" android:textAppearance="@style/TextAppearance.Volume.ZenDetail" /> + </LinearLayout> - <TextView - android:id="@+id/volume_zen_end_now" - style="@style/QSBorderlessButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:clickable="true" - android:focusable="true" - android:minWidth="91dp" - android:text="@string/volume_zen_end_now" - android:textColor="@color/system_accent_color" - android:textAppearance="@style/TextAppearance.QS.DetailButton" /> </LinearLayout> + <TextView + android:id="@+id/volume_zen_end_now" + style="@style/QSBorderlessButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end" + android:layout_marginEnd="8dp" + android:clickable="true" + android:focusable="true" + android:paddingStart="15dp" + android:paddingEnd="15dp" + android:text="@string/volume_zen_end_now" + android:textColor="@color/system_accent_color" + android:textAppearance="@style/TextAppearance.QS.DetailButton" /> + </com.android.systemui.volume.ZenFooter>
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java index 6d67d11..3f6294d 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java +++ b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java @@ -126,8 +126,12 @@ public class ZenFooter extends LinearLayout { : null; Util.setText(mSummaryLine1, line1); - final String line2 = ZenModeConfig.getConditionSummary(mContext, mConfig, - mController.getCurrentUser(), true /*shortVersion*/); + final boolean isForever = mConfig != null && mConfig.manualRule != null + && mConfig.manualRule.conditionId == null; + final String line2 = + isForever ? mContext.getString(com.android.internal.R.string.zen_mode_forever_dnd) + : ZenModeConfig.getConditionSummary(mContext, mConfig, mController.getCurrentUser(), + true /*shortVersion*/); Util.setText(mSummaryLine2, line2); } |