diff options
author | John Spurlock <jspurlock@google.com> | 2014-06-30 18:11:40 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-07-07 18:48:25 -0400 |
commit | ae641c9ccd3f81214cee54a5f13804f1765187ad (patch) | |
tree | c6ca94d2fa82a58257f302b6fd7a73ee6b5689c4 /packages/SystemUI/res | |
parent | 070d66774d31dc92e43feeb045868c58edefd515 (diff) | |
download | frameworks_base-ae641c9ccd3f81214cee54a5f13804f1765187ad.zip frameworks_base-ae641c9ccd3f81214cee54a5f13804f1765187ad.tar.gz frameworks_base-ae641c9ccd3f81214cee54a5f13804f1765187ad.tar.bz2 |
Implement new volume UI design.
- Add segmented zen-mode picker to the rocker UI.
- Add a new "no interruptions" value to the zen setting.
- Implement expandable condition subpanel on the rocker UI.
- Remove the old circle&slash icons.
- Suppress alarm sounds if in "no interruptions" mode.
- Add warning re: alarms to the condition UI.
- Allow rocker UI to display over the keyguard.
- Remove Notifications QS tile.
- Realign volume rocker to the top of the screen.
- Add support for new "days" sleepMode.
- New icon policy rules for "volume" slot.
- New important icon (star).
Associated Settings change:
I6ed56791784968adfbd684f490dbbebed285a2dd
Bug:15831713
Change-Id: I35afe38646f04d2ba0dbac11c2c6356120a33694
Diffstat (limited to 'packages/SystemUI/res')
21 files changed, 274 insertions, 192 deletions
diff --git a/packages/SystemUI/res/color/segmented_button_text_selector.xml b/packages/SystemUI/res/color/segmented_button_text_selector.xml new file mode 100644 index 0000000..13c6169 --- /dev/null +++ b/packages/SystemUI/res/color/segmented_button_text_selector.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. ?android:attr/colorControlHighlight" +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:state_selected="true" android:color="@android:color/white"/> + <item android:color="@color/segmented_button_text_inactive"/> + +</selector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_qs_minus.xml b/packages/SystemUI/res/drawable/ic_qs_minus.xml index 376cc28..7b76e0f 100644 --- a/packages/SystemUI/res/drawable/ic_qs_minus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_minus.xml @@ -15,14 +15,14 @@ Copyright (C) 2014 The Android Open Source Project --> <vector xmlns:android="http://schemas.android.com/apk/res/android" > <size - android:width="64dp" - android:height="64dp"/> + android:width="24dp" + android:height="24dp"/> <viewport - android:viewportWidth="24.0" - android:viewportHeight="24.0"/> + android:viewportWidth="48.0" + android:viewportHeight="48.0"/> <path android:fill="#FFFFFFFF" - android:pathData="M7.0,11.0l0.0,2.0l10.0,0.0l0.0,-2.0L7.0,11.0zM12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/> + android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0s9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0zM34.0,26.0L14.0,26.0l0.0,-4.0l20.0,0.0L34.0,26.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_plus.xml b/packages/SystemUI/res/drawable/ic_qs_plus.xml index a315f7f..4b9f506 100644 --- a/packages/SystemUI/res/drawable/ic_qs_plus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_plus.xml @@ -15,14 +15,14 @@ Copyright (C) 2014 The Android Open Source Project --> <vector xmlns:android="http://schemas.android.com/apk/res/android" > <size - android:width="64dp" - android:height="64dp"/> + android:width="24dp" + android:height="24dp"/> <viewport - android:viewportWidth="24.0" - android:viewportHeight="24.0"/> + android:viewportWidth="48.0" + android:viewportHeight="48.0"/> <path android:fill="#FFFFFFFF" - android:pathData="M13.0,7.0l-2.0,0.0l0.0,4.0L7.0,11.0l0.0,2.0l4.0,0.0l0.0,4.0l2.0,0.0l0.0,-4.0l4.0,0.0l0.0,-2.0l-4.0,0.0L13.0,7.0zM12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/> + android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0s9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0zM34.0,26.0l-8.0,0.0l0.0,8.0l-4.0,0.0l0.0,-8.0l-8.0,0.0l0.0,-4.0l8.0,0.0l0.0,-8.0l4.0,0.0l0.0,8.0l8.0,0.0L34.0,26.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_ringer_silent.xml b/packages/SystemUI/res/drawable/ic_ringer_silent.xml index b5837f6..46b94e8 100644 --- a/packages/SystemUI/res/drawable/ic_ringer_silent.xml +++ b/packages/SystemUI/res/drawable/ic_ringer_silent.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FFFFFFFF" + android:fill="@color/qs_subhead" android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7C9.5,4.3 9.0,4.5 8.6,4.7l9.4,9.4L18.0,10.5zM17.7,19.0l2.0,2.0l1.3,-1.3L4.3,3.0L3.0,4.3l2.9,2.9C5.3,8.2 5.0,9.3 5.0,10.5L5.0,16.0l-2.0,2.0l0.0,1.0L17.7,19.0z" /> </vector> diff --git a/packages/SystemUI/res/drawable/ic_vol_zen_off.xml b/packages/SystemUI/res/drawable/ic_vol_zen_off.xml deleted file mode 100644 index 477c36b..0000000 --- a/packages/SystemUI/res/drawable/ic_vol_zen_off.xml +++ /dev/null @@ -1,28 +0,0 @@ -<!-- -Copyright (C) 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" > - <size - android:width="32dp" - android:height="32dp"/> - - <viewport - android:viewportWidth="48.0" - android:viewportHeight="48.0"/> - - <path - android:fill="#4DFFFFFF" - android:pathData="M4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0s20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0S4.0,13.0 4.0,24.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8zM8.0,24.0c0.0,-3.7 1.3,-7.1 3.4,-9.8L33.8,36.6C31.1,38.7 27.7,40.0 24.0,40.0C15.2,40.0 8.0,32.8 8.0,24.0z"/> -</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_zen_on.xml b/packages/SystemUI/res/drawable/qs_subhead_caret.xml index 4887b32..f140bd0 100644 --- a/packages/SystemUI/res/drawable/ic_qs_zen_on.xml +++ b/packages/SystemUI/res/drawable/qs_subhead_caret.xml @@ -15,14 +15,14 @@ Copyright (C) 2014 The Android Open Source Project --> <vector xmlns:android="http://schemas.android.com/apk/res/android" > <size - android:width="64dp" - android:height="64dp"/> + android:width="24.0dp" + android:height="24.0dp"/> <viewport android:viewportWidth="48.0" android:viewportHeight="48.0"/> <path - android:fill="#FFFFFFFF" - android:pathData="M4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0s20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0S4.0,13.0 4.0,24.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8zM8.0,24.0c0.0,-3.7 1.3,-7.1 3.4,-9.8L33.8,36.6C31.1,38.7 27.7,40.0 24.0,40.0C15.2,40.0 8.0,32.8 8.0,24.0z"/> + android:fill="@color/qs_subhead" + android:pathData="M14.0,20.0l10.0,10.0 10.0,-10.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/segmented_button.xml b/packages/SystemUI/res/drawable/segmented_button.xml new file mode 100644 index 0000000..9669985 --- /dev/null +++ b/packages/SystemUI/res/drawable/segmented_button.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_selected="true"> + <shape android:shape="rectangle"> + <solid android:color="@color/segmented_button_selected" /> + <corners android:radius="@dimen/segmented_button_radius" /> + </shape> + </item> + <item> + <ripple android:color="@color/segmented_button_selected" /> + </item> +</selector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/segmented_buttons.xml b/packages/SystemUI/res/drawable/segmented_buttons.xml new file mode 100644 index 0000000..bfbac97 --- /dev/null +++ b/packages/SystemUI/res/drawable/segmented_buttons.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle" > + <solid android:color="@color/segmented_button_background" /> + <corners android:radius="@dimen/segmented_button_radius" /> +</shape>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml deleted file mode 100644 index 5992470..0000000 --- a/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml +++ /dev/null @@ -1,28 +0,0 @@ -<!-- -Copyright (C) 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<vector xmlns:android="http://schemas.android.com/apk/res/android" > - <size - android:width="18dp" - android:height="18dp"/> - - <viewport - android:viewportWidth="48.0" - android:viewportHeight="48.0"/> - - <path - android:fill="#FFFFFFFF" - android:pathData="M4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0s20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0S4.0,13.0 4.0,24.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8zM8.0,24.0c0.0,-3.7 1.3,-7.1 3.4,-9.8L33.8,36.6C31.1,38.7 27.7,40.0 24.0,40.0C15.2,40.0 8.0,32.8 8.0,24.0z"/> -</vector> diff --git a/packages/SystemUI/res/drawable/ic_vol_zen_on.xml b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml index 0a43a7b..54a9b1b 100644 --- a/packages/SystemUI/res/drawable/ic_vol_zen_on.xml +++ b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml @@ -15,14 +15,14 @@ Copyright (C) 2014 The Android Open Source Project --> <vector xmlns:android="http://schemas.android.com/apk/res/android" > <size - android:width="32dp" - android:height="32dp"/> + android:width="20dp" + android:height="20dp"/> <viewport - android:viewportWidth="48.0" - android:viewportHeight="48.0"/> + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> <path android:fill="#FFFFFFFF" - android:pathData="M4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0s20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0S4.0,13.0 4.0,24.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8zM8.0,24.0c0.0,-3.7 1.3,-7.1 3.4,-9.8L33.8,36.6C31.1,38.7 27.7,40.0 24.0,40.0C15.2,40.0 8.0,32.8 8.0,24.0z"/> + android:pathData="M12.0,17.273l6.1800003,3.7269993 -1.6350002,-7.0290003 5.455,-4.7269993 -7.191,-0.6170006 -2.809,-6.627 -2.809,6.627 -7.191,0.6170006 5.455,4.7269993 -1.6349998,7.0290003z"/> </vector> diff --git a/packages/SystemUI/res/layout/segmented_button.xml b/packages/SystemUI/res/layout/segmented_button.xml new file mode 100644 index 0000000..ef78220 --- /dev/null +++ b/packages/SystemUI/res/layout/segmented_button.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<Button xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/segmented_button_spacing" + android:layout_weight="1" + android:textColor="@color/segmented_button_text_selector" + android:background="@drawable/segmented_button" + android:textAppearance="@style/TextAppearance.QS.SegmentedButton" + android:minHeight="0dp" + android:padding="12dp" /> diff --git a/packages/SystemUI/res/layout/volume_dialog.xml b/packages/SystemUI/res/layout/volume_dialog.xml index 5afa967..7bd0aea 100644 --- a/packages/SystemUI/res/layout/volume_dialog.xml +++ b/packages/SystemUI/res/layout/volume_dialog.xml @@ -15,11 +15,11 @@ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + android:layout_width="@dimen/volume_panel_width" android:layout_height="wrap_content" android:background="@drawable/qs_panel_background" android:translationZ="@dimen/volume_panel_z" - android:layout_margin="@dimen/volume_panel_z"> + android:layout_marginBottom="@dimen/volume_panel_z"> <include layout="@layout/volume_panel" /> diff --git a/packages/SystemUI/res/layout/volume_panel.xml b/packages/SystemUI/res/layout/volume_panel.xml index 046862f..b377a06 100644 --- a/packages/SystemUI/res/layout/volume_panel.xml +++ b/packages/SystemUI/res/layout/volume_panel.xml @@ -14,55 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. --> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/visible_panel" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" > + android:orientation="vertical" > <FrameLayout android:id="@+id/slider_panel" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="64dip" - android:layout_toLeftOf="@+id/expand_button_divider" /> + android:clipChildren="false" /> - <ImageView - android:id="@+id/expand_button_divider" - android:layout_width="wrap_content" - android:layout_height="32dip" - android:layout_gravity="top" - android:layout_marginBottom="16dip" - android:layout_marginTop="16dip" - android:layout_toLeftOf="@+id/expand_button" - android:scaleType="fitXY" - android:src="?android:attr/dividerVertical" /> - - <ImageView - android:id="@+id/expand_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_gravity="top" - style="@style/BorderlessButton.Tiny" - android:padding="16dip" /> - - <ImageView - android:id="@+id/zen_panel_divider" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@+id/slider_panel" - android:layout_marginLeft="16dip" - android:layout_marginRight="16dip" - android:scaleType="fitXY" - android:src="?android:attr/dividerHorizontal" /> - - <ViewStub + <ViewStub android:id="@+id/zen_panel_stub" - android:layout_below="@+id/zen_panel_divider" - android:inflatedId="@+id/zen_panel" android:layout_width="match_parent" android:layout_height="wrap_content" + android:inflatedId="@+id/zen_panel" android:layout="@layout/zen_mode_panel" /> -</RelativeLayout> +</LinearLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/volume_panel_item.xml b/packages/SystemUI/res/layout/volume_panel_item.xml index 6e5ab47..d91e2ab 100644 --- a/packages/SystemUI/res/layout/volume_panel_item.xml +++ b/packages/SystemUI/res/layout/volume_panel_item.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- + Copyright (C) 2011 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,33 +16,29 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="80dip" - android:orientation="horizontal" - android:layout_marginTop="8dip" - android:layout_marginBottom="8dip" - android:gravity="start|center_vertical"> + android:layout_width="match_parent" + android:clipChildren="false" + android:gravity="start|center_vertical" + android:orientation="horizontal" > <ImageView - android:id="@+id/stream_icon" - style="@style/BorderlessButton.Tiny" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="16dip" - android:contentDescription="@null" /> - <FrameLayout - android:id="@+id/seekbar_container" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1"> - <SeekBar - android:id="@+id/seekbar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="16dip" - android:paddingBottom="16dip" - android:paddingStart="11dip" - android:paddingEnd="11dip" - android:layout_marginEnd="16dip" /> - </FrameLayout> -</LinearLayout> + android:id="@+id/stream_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@null" + android:paddingBottom="12dip" + android:paddingLeft="16dip" + android:paddingRight="16dip" + android:paddingTop="12dip" /> + + <SeekBar + android:id="@+id/seekbar" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingBottom="0dip" + android:paddingEnd="17dip" + android:paddingStart="0dip" + android:paddingTop="0dip" /> + +</LinearLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/zen_mode_condition.xml b/packages/SystemUI/res/layout/zen_mode_condition.xml index 6ab8cf3..852a821 100644 --- a/packages/SystemUI/res/layout/zen_mode_condition.xml +++ b/packages/SystemUI/res/layout/zen_mode_condition.xml @@ -16,22 +16,23 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/qs_detail_item_height" android:layout_marginLeft="@dimen/zen_mode_condition_detail_button_padding" - android:layout_marginRight="@dimen/zen_mode_condition_detail_button_padding" > + android:layout_marginRight="@dimen/qs_panel_padding" > <RadioButton android:id="@android:id/checkbox" android:layout_width="40dp" android:layout_marginStart="2dp" - android:layout_height="@dimen/zen_mode_condition_height" + android:layout_marginEnd="1dp" + android:layout_height="match_parent" android:layout_alignParentStart="true" android:gravity="center" /> <TextView android:id="@android:id/title" android:layout_width="match_parent" - android:layout_height="@dimen/zen_mode_condition_height" + android:layout_height="match_parent" android:layout_toEndOf="@android:id/checkbox" android:layout_toStartOf="@android:id/button1" android:ellipsize="end" @@ -42,24 +43,24 @@ <ImageView android:id="@android:id/button1" style="@style/QSBorderlessButton" - android:layout_width="@dimen/zen_mode_condition_height" - android:layout_height="@dimen/zen_mode_condition_height" - android:layout_alignParentEnd="true" + android:layout_width="32dp" + android:layout_height="32dp" android:layout_centerVertical="true" - android:layout_marginEnd="@dimen/zen_mode_condition_height" + android:layout_marginEnd="@dimen/qs_panel_padding" + android:scaleType="center" + android:layout_toStartOf="@android:id/button2" android:contentDescription="@string/accessibility_quick_settings_less_time" - android:padding="@dimen/zen_mode_condition_detail_button_padding" android:src="@drawable/ic_qs_minus" /> <ImageView android:id="@android:id/button2" style="@style/QSBorderlessButton" - android:layout_width="@dimen/zen_mode_condition_height" - android:layout_height="@dimen/zen_mode_condition_height" + android:layout_width="32dp" + android:layout_height="32dp" android:layout_alignParentEnd="true" + android:scaleType="center" android:layout_centerVertical="true" android:contentDescription="@string/accessibility_quick_settings_more_time" - android:padding="@dimen/zen_mode_condition_detail_button_padding" android:src="@drawable/ic_qs_plus" /> </RelativeLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/zen_mode_panel.xml b/packages/SystemUI/res/layout/zen_mode_panel.xml index 0420cbc..9d959fa 100644 --- a/packages/SystemUI/res/layout/zen_mode_panel.xml +++ b/packages/SystemUI/res/layout/zen_mode_panel.xml @@ -19,36 +19,75 @@ android:id="@+id/zen_mode_panel" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/system_primary_color" + android:background="@drawable/qs_panel_background" + android:clipChildren="false" android:orientation="vertical" - android:paddingTop="@dimen/qs_panel_padding" > + android:paddingBottom="@dimen/qs_panel_padding" > - <TextView - android:id="@android:id/title" - android:layout_width="wrap_content" + <com.android.systemui.volume.SegmentedButtons + android:id="@+id/zen_buttons" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/qs_panel_padding" + android:layout_marginRight="@dimen/qs_panel_padding" + android:layout_marginTop="8dp" + android:background="@drawable/segmented_buttons" + android:clipChildren="false" /> + + <FrameLayout + android:id="@+id/zen_subhead" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_marginBottom="8dp" - android:layout_marginStart="@dimen/qs_panel_padding" - android:layout_marginEnd="@dimen/qs_panel_padding" - android:text="@string/zen_mode_title" - android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" /> + android:paddingLeft="@dimen/qs_panel_padding" + android:paddingRight="@dimen/qs_panel_padding" + android:paddingTop="@dimen/qs_panel_padding" > + + <TextView + android:id="@+id/zen_subhead_collapsed" + android:layout_width="wrap_content" + android:layout_height="32dp" + android:background="@drawable/btn_borderless_rect" + android:clickable="true" + android:drawableEnd="@drawable/qs_subhead_caret" + android:gravity="center_vertical" + android:textAppearance="@style/TextAppearance.QS.Subhead" /> + + <TextView + android:id="@+id/zen_subhead_expanded" + android:layout_width="wrap_content" + android:layout_height="32dp" + android:clickable="true" + android:gravity="center_vertical" + android:textAppearance="@style/TextAppearance.QS.Subhead" /> + + <ImageView + android:id="@+id/zen_more_settings" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="end" + android:background="@drawable/btn_borderless_rect" + android:clickable="true" + android:contentDescription="@null" + android:scaleType="center" + android:src="@drawable/ic_settings_24dp" /> + </FrameLayout> <LinearLayout - android:id="@android:id/content" + android:id="@+id/zen_conditions" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" /> + android:orientation="vertical" + android:paddingTop="3dp" /> <TextView - android:id="@android:id/button2" - style="@style/QSBorderlessButton" - android:layout_width="wrap_content" + android:id="@+id/zen_alarm_warning" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_marginEnd="4dp" - android:layout_gravity="end" - android:text="@string/quick_settings_more_settings" - android:textAppearance="@style/TextAppearance.QS.DetailButton" /> + android:paddingBottom="8dp" + android:paddingLeft="@dimen/qs_panel_padding" + android:paddingRight="@dimen/qs_panel_padding" + android:paddingTop="8dp" + android:text="@string/zen_alarm_warning" + android:textAppearance="@style/TextAppearance.QS.Warning" /> </com.android.systemui.volume.ZenModePanel>
\ No newline at end of file diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index a93768b..a3a6a55 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -40,6 +40,7 @@ <color name="system_error_color">#fff0592b</color> <color name="qs_tile_divider">#29ffffff</color><!-- 16% white --> <color name="qs_tile_text">#B3FFFFFF</color><!-- 70% white --> + <color name="qs_subhead">#66FFFFFF</color><!-- 40% white --> <color name="status_bar_clock_color">#FFFFFFFF</color> <!-- Tint color for the content on the notification overflow card. --> @@ -85,4 +86,8 @@ <color name="primary_color">#ff7fcac3</color> <color name="background_color_1">#ff384248</color> <color name="background_color_1_press">#ff54656e</color> + + <color name="segmented_button_selected">#ff3d4549</color><!-- #33afbdc4 = 20% #afbdc4 = #ff3d4549 composite --> + <color name="segmented_button_background">#ff21272b</color> + <color name="segmented_button_text_inactive">#b3afbdc4</color><!-- 70% --> </resources> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 2737f7e..5c7dc90 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -147,9 +147,6 @@ be 'platform' or 'noisy' (i.e. for noisy touch screens). --> <string name="velocity_tracker_impl" translatable="false">platform</string> - <!-- Wait on the touch feedback this long before performing an action. --> - <integer name="feedback_start_delay">300</integer> - <!-- Set to true to enable the classic notification ticker that scrolls Notification.tickerText across the status bar for what seems like an eternity. --> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index dfb891d..e3c0f5f 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -169,14 +169,16 @@ <dimen name="qs_tile_spacing">4dp</dimen> <dimen name="qs_panel_padding_bottom">8dp</dimen> <dimen name="qs_detail_item_height">48dp</dimen> - <dimen name="qs_detail_item_height_connected">72dp</dimen> + <dimen name="qs_detail_item_height_twoline">72dp</dimen> + <dimen name="segmented_button_spacing">4dp</dimen> + <dimen name="segmented_button_radius">2dp</dimen> + <!-- How far the expanded QS panel peeks from the header in collapsed state. --> <dimen name="qs_peek_height">8dp</dimen> <dimen name="zen_mode_condition_detail_button_padding">8dp</dimen> - <dimen name="zen_mode_condition_height">48dp</dimen> <!-- used by DessertCase --> <dimen name="dessert_case_cell_size">192dp</dimen> @@ -287,10 +289,10 @@ <dimen name="keyguard_min_swipe_amount">75dp</dimen> <!-- Volume panel dialog y offset --> - <dimen name="volume_panel_top">16dp</dimen> + <dimen name="volume_panel_top">0dp</dimen> <!-- Volume panel dialog width --> - <dimen name="volume_panel_width">300dp</dimen> + <dimen name="volume_panel_width">344dp</dimen> <!-- Volume panel z depth --> <dimen name="volume_panel_z">3dp</dimen> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index a5cfdbc..79cc24b 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -583,8 +583,14 @@ <!-- Description of the left direction in which one can to slide the handle in the Slide unlock screen. [CHAR LIMIT=NONE] --> <string name="description_direction_left">"Slide left for <xliff:g id="target_description" example="Unlock">%s</xliff:g>.</string> - <!-- Zen mode: Short title. [CHAR LIMIT=40] --> - <string name="zen_mode_title">Do not disturb</string> + <!-- Zen mode: Alarm warning. [CHAR LIMIT=40] --> + <string name="zen_alarm_warning">You won\'t hear your alarms</string> + + <!-- Zen mode: No interruptions. [CHAR LIMIT=40] --> + <string name="zen_no_interruptions">No interruptions</string> + + <!-- Zen mode: Only important interruptions. [CHAR LIMIT=40] --> + <string name="zen_important_interruptions">Priority interruptions only</string> <!-- Text for overflow card on Keyguard when there is not enough space for all notifications on Keyguard. [CHAR LIMIT=1] --> <string name="keyguard_more_overflow_text">+<xliff:g id="number_of_notifications" example="5">%d</xliff:g></string> @@ -607,7 +613,16 @@ <string name="bugreport_tile_extended" translatable="false">%s\n%s (%s)</string> <!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] --> - <string name="zen_mode_forever">Until you turn this off</string> + <string name="zen_mode_forever">Indefinitely</string> + + <!-- Interruption level: None. [CHAR LIMIT=20] --> + <string name="interruption_level_none">None</string> + + <!-- Interruption level: Priority. [CHAR LIMIT=20] --> + <string name="interruption_level_priority">Priority</string> + + <!-- Interruption level: All. [CHAR LIMIT=20] --> + <string name="interruption_level_all">All</string> <!-- Indication on the keyguard that is shown when the device is charging. [CHAR LIMIT=40]--> <string name="keyguard_indication_charging_time">Charging (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index dd1b749..f920a1f 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -179,6 +179,23 @@ <item name="android:gravity">center</item> </style> + <style name="TextAppearance.QS.Subhead"> + <item name="android:textSize">14sp</item> + <item name="android:fontFamily">sans-serif-medium</item> + <item name="android:textColor">@color/qs_subhead</item> + </style> + + <style name="TextAppearance.QS.Warning"> + <item name="android:textSize">12sp</item> + <item name="android:textColor">@color/qs_subhead</item> + </style> + + <style name="TextAppearance.QS.SegmentedButton"> + <item name="android:textSize">12sp</item> + <item name="android:textAllCaps">true</item> + <item name="android:fontFamily">sans-serif-medium</item> + </style> + <style name="BaseBrightnessDialogContainer"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> @@ -239,10 +256,10 @@ <item name="android:background">@drawable/btn_borderless_rect</item> <item name="android:gravity">center</item> </style> - <style name="BorderlessButton" parent="@android:style/Widget.Material.Button.Borderless" /> - <style name="BorderlessButton.Tiny"> - <item name="android:minHeight">12dip</item> - <item name="android:minWidth">12dip</item> + <!-- Window animations used for volume panel. --> + <style name="VolumePanelAnimation"> + <item name="android:windowEnterAnimation">@*android:anim/dock_top_enter</item> + <item name="android:windowExitAnimation">@*android:anim/dock_top_exit</item> </style> </resources> |