Merge "Redesign zen visual effects screens"
This commit is contained in:
committed by
Android (Google) Code Review
commit
302b27ab9a
90
res/layout/preference_two_target_radio.xml
Normal file
90
res/layout/preference_two_target_radio.xml
Normal file
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2018 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"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@android:color/transparent"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="start|center_vertical"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/checkbox_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minWidth="56dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="vertical">
|
||||
<RadioButton
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:ellipsize="marquee" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@android:id/title"
|
||||
android:layout_alignStart="@android:id/title"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="10" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/preference_two_target_divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minWidth="64dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
26
res/layout/preference_widget_zen_master_icon.xml
Normal file
26
res/layout/preference_widget_zen_master_icon.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2018 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.
|
||||
-->
|
||||
|
||||
<!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
|
||||
inside android.R.layout.preference. -->
|
||||
<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
@@ -7215,8 +7215,39 @@
|
||||
<!-- Do not disturb: Subtitle for the Visual signals option to toggle on/off visual signals/alerts when the screen is on/when screen is off. [CHAR LIMIT=30] -->
|
||||
<string name="zen_mode_visual_signals_settings_subtitle">Allow visual signals</string>
|
||||
|
||||
<!-- Do not disturb: restrict notifications title [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_screen_title">Restrict notifications</string>
|
||||
<!-- Do not disturb: restrict notifications title [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_title">Notifications</string>
|
||||
<!-- Do not disturb: restrict notifications category title [CHAR LIMIT=100] -->
|
||||
<string name="zen_mode_restrict_notifications_category">When Do Not Disturb is turned on</string>
|
||||
<!-- Do not disturb: Mute notifications option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_mute">Mute notifications</string>
|
||||
<!-- Do not disturb:Mute notifications summary [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_restrict_notifications_mute_summary">Show notifications but mute sounds & vibrations</string>
|
||||
<!-- Do not disturb:Mute notifications footer [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_restrict_notifications_mute_footer">When new notifications arrive your phone won\u2019t make a sound or vibration</string>
|
||||
<!-- Do not disturb: Hide notifications option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_hide">Hide & mute notifications</string>
|
||||
<!-- Do not disturb: Hide notifications summary [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_restrict_notifications_hide_summary">Notifications will not appear at all</string>
|
||||
<!-- Do not disturb: Hide notifications footer [CHAR LIMIT=NONE] -->
|
||||
<string name="zen_mode_restrict_notifications_hide_footer">You won\u2019t see new or existing notifications when Do Not Disturb is on. However, notifications needed for basic phone activity and status will still appear.</string>
|
||||
<!-- Do not disturb: Custom settings option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_custom">Custom</string>
|
||||
<!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_enable_custom">Enable custom setting</string>
|
||||
<!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_disable_custom">Remove custom setting</string>
|
||||
<!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_summary_muted">Will appear</string>
|
||||
<!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_summary_custom">Partially hidden</string>
|
||||
<!-- Do not disturb: restrict notifications page, menu option [CHAR LIMIT=60] -->
|
||||
<string name="zen_mode_restrict_notifications_summary_hidden">Hidden</string>
|
||||
|
||||
<!-- Do not disturb: what to block title [CHAR LIMIT = 60] -->
|
||||
<string name="zen_mode_what_to_block_title">Block visual disturbances</string>
|
||||
<string name="zen_mode_what_to_block_title">Custom restrictions</string>
|
||||
<!-- Do not disturb: what to block > effects title [CHAR LIMIT = 60] -->
|
||||
<string name="zen_mode_block_effects_screen_on">When the screen is on</string>
|
||||
<!-- Do not disturb: what to block > effects title [CHAR LIMIT = 60] -->
|
||||
|
43
res/xml/zen_mode_restrict_notifications_settings.xml
Normal file
43
res/xml/zen_mode_restrict_notifications_settings.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018 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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="zen_mode_restrict_settings_page"
|
||||
android:title="@string/zen_mode_restrict_notifications_screen_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="restrict_category"
|
||||
android:title="@string/zen_mode_restrict_notifications_category">
|
||||
<com.android.settings.notification.ZenCustomRadioButtonPreference
|
||||
android:key="zen_mute_notifications"
|
||||
android:title="@string/zen_mode_restrict_notifications_mute"
|
||||
android:summary="@string/zen_mode_restrict_notifications_mute_summary"/>
|
||||
|
||||
<com.android.settings.notification.ZenCustomRadioButtonPreference
|
||||
android:key="zen_hide_notifications"
|
||||
android:title="@string/zen_mode_restrict_notifications_hide"
|
||||
android:summary="@string/zen_mode_restrict_notifications_hide_summary"/>
|
||||
|
||||
<com.android.settings.notification.ZenCustomRadioButtonPreference
|
||||
android:key="zen_custom"
|
||||
android:title="@string/zen_mode_restrict_notifications_custom" />
|
||||
|
||||
</PreferenceCategory>
|
||||
<com.android.settingslib.widget.FooterPreference />
|
||||
|
||||
</PreferenceScreen>
|
@@ -31,8 +31,8 @@
|
||||
<!-- What to block (effects) -->
|
||||
<Preference
|
||||
android:key="zen_mode_block_effects_settings"
|
||||
android:title="@string/zen_mode_what_to_block_title"
|
||||
android:fragment="com.android.settings.notification.ZenModeBlockedEffectsSettings" />
|
||||
android:title="@string/zen_mode_restrict_notifications_title"
|
||||
android:fragment="com.android.settings.notification.ZenModeRestrictNotificationsSettings" />
|
||||
|
||||
<!-- Behavior settings (exceptions) -->
|
||||
<Preference
|
||||
|
Reference in New Issue
Block a user