diff options
author | John Spurlock <jspurlock@google.com> | 2014-05-23 11:58:00 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-05-27 10:08:00 -0400 |
commit | 8600534df66c2ff5846ed230b50c56229322d48a (patch) | |
tree | dbd483a1171fc8cc1107e4cce0d3cc749f98748e /packages/SystemUI/res/layout | |
parent | 41b170d6066cb52bb3e396c608b01f2981b95e5d (diff) | |
download | frameworks_base-8600534df66c2ff5846ed230b50c56229322d48a.zip frameworks_base-8600534df66c2ff5846ed230b50c56229322d48a.tar.gz frameworks_base-8600534df66c2ff5846ed230b50c56229322d48a.tar.bz2 |
VolumeZen: combine ringer/notification volume and zen.
- Implement a new volume panel widget, combining volume and
zen mode + conditions.
- Show zen mode + conditions when modifying ringer or notification
streams.
- Host the volume panel widget in a dialog when being controlled
by the audio service / volume keys.
- Remove support for multiple sliders in the volume panel.
- Remove support for separate ringer + notification volumes
in the volume panel.
- Move volume panel resources up to SystemUI.
- Create a new combined Notifications quick settings tile.
- Host the volume panel widget in the quick settings panel under
Notifications.
- When the quick settings detail panel is visible, route the volume
keys to the embedded widget instead of showing a redundant dialog.
- Create common styles for quick settings text to be closer to spec.
- Update the framework resources for the ringer stream.
- Show the ringer icons in global actions.
- Add "until you turn this off" back as a separate zen condition.
- Disable time condition buttons when they are N/A.
- Don't allow volume changes to set ringer mode silent.
Bug:15186070
Change-Id: Id5e321dd1d5e7c4cf3917027ffbdf7e80d38b00d
Diffstat (limited to 'packages/SystemUI/res/layout')
-rw-r--r-- | packages/SystemUI/res/layout/qs_detail.xml (renamed from packages/SystemUI/res/layout/qs_zen_mode_detail.xml) | 52 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/user_switcher_host.xml | 2 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/volume_panel.xml | 67 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/volume_panel_item.xml | 42 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/zen_mode_condition.xml (renamed from packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml) | 37 | ||||
-rw-r--r-- | packages/SystemUI/res/layout/zen_mode_panel.xml | 51 |
6 files changed, 197 insertions, 54 deletions
diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml b/packages/SystemUI/res/layout/qs_detail.xml index 85b294d..e73b431 100644 --- a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml +++ b/packages/SystemUI/res/layout/qs_detail.xml @@ -14,64 +14,44 @@ See the License for the specific language governing permissions and limitations under the License. --> -<com.android.systemui.qs.tiles.ZenModeDetail xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/system_secondary_color" > + android:background="@color/system_primary_color" > <ImageView android:id="@android:id/button1" - android:src="@drawable/ic_qs_close" android:layout_width="64dp" android:layout_height="64dp" android:layout_alignParentStart="true" - android:padding="@dimen/qs_panel_padding" /> - - <Switch - android:id="@android:id/checkbox" - android:layout_width="wrap_content" - android:layout_height="64dp" - android:layout_alignParentEnd="true" - android:gravity="center" - android:padding="@dimen/qs_panel_padding" /> + android:contentDescription="@string/accessibility_quick_settings_close" + android:padding="@dimen/qs_panel_padding" + android:src="@drawable/ic_qs_close" /> <TextView android:id="@android:id/title" android:layout_width="match_parent" android:layout_height="64dp" + android:layout_alignParentTop="true" android:layout_toEndOf="@android:id/button1" android:layout_toStartOf="@android:id/checkbox" - android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:gravity="center_vertical" - android:paddingStart="@dimen/qs_panel_padding" - android:text="@string/zen_mode_title" /> + android:textAppearance="@style/TextAppearance.QS.DetailHeader" /> - <View + <ImageView android:id="@android:id/custom" android:layout_width="match_parent" - android:layout_height="2dp" + android:layout_height="wrap_content" android:layout_below="@android:id/title" - android:background="#888" /> + android:layout_marginLeft="16dip" + android:layout_marginRight="16dip" + android:scaleType="fitXY" + android:src="?android:attr/dividerHorizontal" /> - <ListView + <FrameLayout android:id="@android:id/content" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_above="@android:id/button2" - android:layout_below="@android:id/custom" - android:divider="#00000000" - android:dividerHeight="0px" /> - - <TextView - android:id="@android:id/button2" - style="@style/QSBorderless" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentEnd="true" - android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" - android:padding="@dimen/qs_panel_padding" - android:text="@string/quick_settings_more_settings" - android:textAllCaps="true" /> + android:layout_below="@android:id/custom" /> -</com.android.systemui.qs.tiles.ZenModeDetail>
\ No newline at end of file +</RelativeLayout>
\ No newline at end of file diff --git a/packages/SystemUI/res/layout/user_switcher_host.xml b/packages/SystemUI/res/layout/user_switcher_host.xml index 70c5042..816af57 100644 --- a/packages/SystemUI/res/layout/user_switcher_host.xml +++ b/packages/SystemUI/res/layout/user_switcher_host.xml @@ -27,7 +27,7 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@*android:dimen/volume_panel_top" + android:layout_marginTop="@dimen/volume_panel_top" android:background="@*android:drawable/dialog_full_holo_dark"> <ListView android:id="@android:id/list" android:layout_width="match_parent" diff --git a/packages/SystemUI/res/layout/volume_panel.xml b/packages/SystemUI/res/layout/volume_panel.xml new file mode 100644 index 0000000..bc7288d --- /dev/null +++ b/packages/SystemUI/res/layout/volume_panel.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2007 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. +--> +<RelativeLayout 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" > + + <FrameLayout + android:id="@+id/slider_panel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_toLeftOf="@+id/expand_button_divider" /> + + <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 + 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:layout="@layout/zen_mode_panel" /> + +</RelativeLayout> diff --git a/packages/SystemUI/res/layout/volume_panel_item.xml b/packages/SystemUI/res/layout/volume_panel_item.xml new file mode 100644 index 0000000..98cb8f4 --- /dev/null +++ b/packages/SystemUI/res/layout/volume_panel_item.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. + 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. +--> + +<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"> + + <ImageView + android:id="@+id/stream_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="16dip" + android:background="?android:attr/selectableItemBackground" + android:contentDescription="@null" /> + + <SeekBar + style="?android:attr/seekBarStyle" + android:id="@+id/seekbar" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:padding="16dip" + android:layout_marginEnd="16dip" /> + +</LinearLayout> diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml b/packages/SystemUI/res/layout/zen_mode_condition.xml index fd27aaf..8b34400 100644 --- a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml +++ b/packages/SystemUI/res/layout/zen_mode_condition.xml @@ -16,44 +16,47 @@ --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="wrap_content" > <RadioButton android:id="@android:id/checkbox" android:layout_width="32dp" - android:layout_height="64dp" + android:layout_height="@dimen/zen_mode_condition_height" android:layout_alignParentStart="true" - android:layout_marginStart="@dimen/qs_panel_padding" android:gravity="center" /> <TextView android:id="@android:id/title" android:layout_width="match_parent" - android:layout_height="64dp" + android:layout_height="@dimen/zen_mode_condition_height" android:layout_toEndOf="@android:id/checkbox" android:layout_toStartOf="@android:id/button1" android:ellipsize="end" - android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:gravity="center_vertical" android:maxLines="1" - android:text="@string/accessibility_back" /> + android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" /> <ImageView android:id="@android:id/button1" - android:src="@drawable/ic_qs_minus" - android:layout_width="64dp" - android:layout_height="64dp" + style="@style/BorderlessButton" + android:layout_width="@dimen/zen_mode_condition_height" + android:layout_height="@dimen/zen_mode_condition_height" android:layout_alignParentEnd="true" - android:layout_marginEnd="48dp" - android:padding="@dimen/qs_panel_padding" - android:paddingRight="0px" /> + android:layout_centerVertical="true" + android:layout_marginEnd="@dimen/zen_mode_condition_height" + 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" - android:src="@drawable/ic_qs_plus" - android:layout_width="64dp" - android:layout_height="64dp" + style="@style/BorderlessButton" + android:layout_width="@dimen/zen_mode_condition_height" + android:layout_height="@dimen/zen_mode_condition_height" android:layout_alignParentEnd="true" - android:padding="@dimen/qs_panel_padding" /> + 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> +</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 new file mode 100644 index 0000000..ae04bf5 --- /dev/null +++ b/packages/SystemUI/res/layout/zen_mode_panel.xml @@ -0,0 +1,51 @@ +<?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. +--> +<!-- extends LinearLayout --> +<com.android.systemui.volume.ZenModePanel xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/zen_mode_panel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/system_primary_color" + android:orientation="vertical" + android:padding="@dimen/qs_panel_padding" > + + <TextView + android:id="@android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_marginBottom="8dp" + android:text="@string/zen_mode_title" + android:textAppearance="@style/TextAppearance.QS.DetailHeader" /> + + <LinearLayout + android:id="@android:id/content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <TextView + android:id="@android:id/button2" + style="@style/BorderlessButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_gravity="end" + android:text="@string/quick_settings_more_settings" + android:textAppearance="@style/TextAppearance.QS.DetailButton" /> + +</com.android.systemui.volume.ZenModePanel>
\ No newline at end of file |