Merge "Updated bubble setting design according to b/284170911." into main

This commit is contained in:
Mykola Podolian
2024-03-08 15:10:04 +00:00
committed by Android (Google) Code Review
5 changed files with 63 additions and 244 deletions

View File

@@ -1,25 +0,0 @@
<!--
~ Copyright (C) 2020 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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"
android:fillColor="#000000"/>
</vector>

View File

@@ -1,25 +0,0 @@
<!--
~ Copyright (C) 2020 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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10 10,-4.5 10,-10S17.5,2 12,2zM4,12c0,-4.4 3.6,-8 8,-8 1.8,0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4,13.8 4,12zM12,20c-1.8,0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20,10.2 20,12c0,4.4 -3.6,8 -8,8z"
android:fillColor="#000000"/>
</vector>

View File

@@ -1,25 +0,0 @@
<!--
~ Copyright (C) 2020 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"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:pathData="M15,8c0,-1.42 -0.5,-2.73 -1.33,-3.76 0.42,-0.14 0.86,-0.24 1.33,-0.24 2.21,0 4,1.79 4,4s-1.79,4 -4,4c-0.43,0 -0.84,-0.09 -1.23,-0.21 -0.03,-0.01 -0.06,-0.02 -0.1,-0.03C14.5,10.73 15,9.42 15,8zM16.66,13.13C18.03,14.06 19,15.32 19,17v3h4v-3c0,-2.18 -3.58,-3.47 -6.34,-3.87zM9,6c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2m0,9c-2.7,0 -5.8,1.29 -6,2.01L3,18h12v-1c-0.2,-0.71 -3.3,-2 -6,-2M9,4c2.21,0 4,1.79 4,4s-1.79,4 -4,4 -4,-1.79 -4,-4 1.79,-4 4,-4zM9,13c2.67,0 8,1.34 8,4v3L1,20v-3c0,-2.66 5.33,-4 8,-4z"
android:fillColor="#000000"/>
</vector>

View File

@@ -15,13 +15,12 @@
~ limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/notification_importance_toggle_marginTop"
android:orientation="vertical">
android:orientation="vertical"
android:padding="@dimen/notification_importance_toggle_marginTop">
<!-- If bubbles is managed by the admin this is used to inform the user. -->
<TextView
@@ -30,102 +29,45 @@
android:layout_height="wrap_content"
android:padding="@dimen/notification_importance_button_padding"
android:textAppearance="@style/TextAppearance.Small"
android:visibility="gone"
/>
android:visibility="gone" />
<com.android.settings.notification.NotificationButtonRelativeLayout
android:id="@+id/bubble_all"
<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/notification_importance_button_padding"
android:clickable="true"
android:focusable="true">
<ImageView
android:id="@+id/bubble_all_icon"
android:src="@drawable/ic_bubble_all"
android:background="@android:color/transparent"
android:layout_centerVertical="true"
android:checkedButton="@+id/redact_sensitive">
<RadioButton
android:id="@+id/bubble_all"
style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/bubble_all_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="end"
android:maxLines="3"
android:clickable="false"
android:focusable="false"
android:layout_toEndOf="@id/bubble_all_icon"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/bubble_app_setting_all"/>
</com.android.settings.notification.NotificationButtonRelativeLayout>
android:layout_marginVertical="0dp"
android:fontFamily="@*android:string/config_headlineFontFamily"
android:minHeight="56dp"
android:text="@string/bubble_app_setting_all"
android:textColor="?android:attr/textColorSecondary" />
<com.android.settings.notification.NotificationButtonRelativeLayout
android:id="@+id/bubble_selected"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/notification_importance_button_padding"
android:layout_marginTop="@dimen/notification_importance_button_separation"
android:clickable="true"
android:focusable="true">
<ImageView
android:id="@+id/bubble_selected_icon"
android:src="@drawable/ic_bubble_selected"
android:background="@android:color/transparent"
android:layout_centerVertical="true"
<RadioButton
android:id="@+id/bubble_selected"
style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/bubble_selected_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="end"
android:maxLines="3"
android:clickable="false"
android:focusable="false"
android:layout_toEndOf="@id/bubble_selected_icon"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/bubble_app_setting_selected"/>
</com.android.settings.notification.NotificationButtonRelativeLayout>
android:layout_marginVertical="0dp"
android:fontFamily="@*android:string/config_headlineFontFamily"
android:minHeight="56dp"
android:text="@string/bubble_app_setting_selected"
android:textColor="?android:attr/textColorSecondary" />
<com.android.settings.notification.NotificationButtonRelativeLayout
android:id="@+id/bubble_none"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/notification_importance_button_padding"
android:layout_marginTop="@dimen/notification_importance_button_separation"
android:clickable="true"
android:focusable="true">
<ImageView
android:id="@+id/bubble_none_icon"
android:src="@drawable/ic_bubble_none"
android:background="@android:color/transparent"
android:layout_centerVertical="true"
<RadioButton
android:id="@+id/bubble_none"
style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"/>
<TextView
android:id="@+id/bubble_none_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:ellipsize="end"
android:maxLines="3"
android:clickable="false"
android:focusable="false"
android:layout_toEndOf="@id/bubble_none_icon"
android:layout_marginStart="@dimen/notification_importance_drawable_padding"
android:textAppearance="@style/TextAppearance.NotificationImportanceButton.Unselected"
android:text="@string/bubble_app_setting_none"/>
</com.android.settings.notification.NotificationButtonRelativeLayout>
android:layout_marginVertical="0dp"
android:fontFamily="@*android:string/config_headlineFontFamily"
android:minHeight="56dp"
android:text="@string/bubble_app_setting_none"
android:textColor="?android:attr/textColorSecondary" />
</RadioGroup>
</LinearLayout>