Loading packages/SystemUI/res/drawable/volume_background.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 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 --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> <item> <shape> <size android:width="@dimen/volume_dialog_panel_width" /> <solid android:color="?androidprv:attr/colorSurface" /> <corners android:radius="@dimen/volume_dialog_panel_width_half"/> </shape> </item> </layer-list> No newline at end of file packages/SystemUI/res/drawable/volume_row_seekbar.xml +14 −29 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ ~ 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. Loading @@ -19,33 +18,19 @@ and a bottom-aligned icon) and a progress layer (with an accent-colored round rect and icon) that moves up and down with the progress value. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack" > <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <layer-list> <item android:id="@+id/volume_seekbar_background_solid"> <inset android:insetLeft="@dimen/rounded_slider_track_inset" android:insetRight="@dimen/rounded_slider_track_inset" > <shape> <size android:height="@dimen/volume_dialog_slider_width" /> <solid android:color="?android:attr/colorBackgroundFloating" /> <corners android:radius="@dimen/volume_dialog_slider_corner_radius" /> <size android:height="@dimen/volume_dialog_track_width" /> <corners android:radius="@dimen/volume_dialog_track_corner_radius" /> <solid android:color="?androidprv:attr/colorAccentSecondaryVariant" /> </shape> </item> <item android:id="@+id/volume_seekbar_background_icon" android:gravity="center_vertical|left" android:height="@dimen/rounded_slider_icon_size" android:width="@dimen/rounded_slider_icon_size" android:left="@dimen/rounded_slider_icon_inset"> <rotate android:fromDegrees="-270" android:toDegrees="-270"> <!-- A placeholder drawable is required here - it'll be replaced in code. --> <com.android.systemui.util.AlphaTintDrawableWrapper android:drawable="@drawable/ic_volume_media" android:tint="?android:attr/colorAccent" /> </rotate> </item> </layer-list> </inset> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> Loading packages/SystemUI/res/drawable/volume_row_seekbar_progress.xml +4 −3 Original line number Diff line number Diff line Loading @@ -18,12 +18,13 @@ <!-- Progress drawable for volume row SeekBars. This is the accent-colored round rect that moves up and down as the progress value changes. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:autoMirrored="true"> <item android:id="@+id/volume_seekbar_progress_solid"> <shape> <size android:height="@dimen/volume_dialog_panel_width" /> <size android:height="@dimen/volume_dialog_slider_width" /> <solid android:color="?android:attr/colorAccent" /> <corners android:radius="@dimen/volume_dialog_panel_width_half"/> <corners android:radius="@dimen/volume_dialog_slider_corner_radius"/> </shape> </item> <item Loading @@ -38,7 +39,7 @@ <!-- A placeholder drawable is required here - it'll be replaced in code. --> <com.android.systemui.util.AlphaTintDrawableWrapper android:drawable="@drawable/ic_volume_media" android:tint="?android:attr/colorBackgroundFloating" /> android:tint="?androidprv:attr/colorAccentPrimaryVariant" /> </rotate> </item> </layer-list> No newline at end of file packages/SystemUI/res/layout/volume_dialog.xml +71 −67 Original line number Diff line number Diff line Loading @@ -16,31 +16,37 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:id="@+id/volume_dialog_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:layout_gravity="right" android:paddingRight="@dimen/volume_dialog_stream_padding" android:clipToPadding="false" android:background="@android:color/transparent" android:theme="@style/volume_dialog_theme"> <!-- right-aligned to be physically near volume button --> <LinearLayout android:id="@+id/volume_dialog" android:minWidth="@dimen/volume_dialog_panel_width" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:layout_gravity="right" android:background="@android:color/transparent" android:paddingRight="@dimen/volume_dialog_panel_transparent_padding_right" android:paddingLeft="@dimen/volume_dialog_panel_transparent_padding" android:layout_marginRight="@dimen/volume_dialog_panel_transparent_padding_right" android:orientation="vertical" android:clipToPadding="false" android:clipChildren="false"> <LinearLayout android:id="@+id/volume_dialog_ringer_and_rows_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:padding="7dp" android:clipChildren="false" android:background="@drawable/volume_background"> <include layout="@layout/volume_ringer_drawer" /> <FrameLayout Loading Loading @@ -75,7 +81,6 @@ <LinearLayout android:id="@+id/main" android:minWidth="@dimen/volume_dialog_panel_width" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" Loading @@ -87,7 +92,6 @@ android:id="@+id/volume_dialog_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="@dimen/volume_dialog_panel_width" android:gravity="center" android:orientation="horizontal" android:layout_marginTop="@dimen/volume_row_slider_padding_start"> Loading @@ -105,25 +109,26 @@ android:layout_gravity="center" android:contentDescription="@string/accessibility_volume_settings" android:background="@drawable/ripple_drawable_20dp" android:tint="?android:attr/colorBackgroundFloating" android:tint="?androidprv:attr/colorAccent" android:soundEffectsEnabled="false" /> </FrameLayout> </LinearLayout> </LinearLayout> <FrameLayout android:id="@+id/odi_captions" android:layout_width="@dimen/volume_dialog_caption_size" android:layout_height="@dimen/volume_dialog_caption_size" android:layout_marginTop="@dimen/volume_dialog_spacer" android:layout_marginTop="@dimen/volume_dialog_row_margin_bottom" android:gravity="right" android:layout_gravity="right" android:layout_gravity="center" android:clipToPadding="false" android:background="@drawable/rounded_bg_full"> android:background="@drawable/volume_background"> <com.android.systemui.volume.CaptionsToggleImageButton android:id="@+id/odi_captions_icon" android:src="@drawable/ic_volume_odi_captions_disabled" style="@style/VolumeButtons" android:background="@drawable/rounded_ripple" android:layout_width="match_parent" android:layout_height="match_parent" android:tint="?android:attr/colorAccent" Loading @@ -131,7 +136,6 @@ android:soundEffectsEnabled="false" sysui:optedOut="false"/> </FrameLayout> </LinearLayout> <ViewStub Loading packages/SystemUI/res/layout/volume_dialog_row.xml +5 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:tag="row" android:layout_height="wrap_content" android:layout_width="@dimen/volume_dialog_panel_width" android:layout_width="@dimen/volume_dialog_slider_width" android:clipChildren="false" android:clipToPadding="false" android:translationZ="@dimen/volume_dialog_elevation" Loading @@ -25,7 +25,7 @@ <LinearLayout android:layout_height="wrap_content" android:layout_width="@dimen/volume_dialog_panel_width" android:layout_width="@dimen/volume_dialog_slider_width" android:gravity="center" android:layout_gravity="center" android:orientation="vertical" > Loading Loading @@ -54,7 +54,9 @@ android:layout_width="@dimen/volume_row_slider_height" android:layout_height="match_parent" android:layout_gravity="center" android:thumb="@android:color/transparent" android:thumb="@null" android:splitTrack="false" android:progressDrawable="@drawable/volume_row_seekbar" android:rotation="270" /> </FrameLayout> Loading Loading
packages/SystemUI/res/drawable/volume_background.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 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 --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> <item> <shape> <size android:width="@dimen/volume_dialog_panel_width" /> <solid android:color="?androidprv:attr/colorSurface" /> <corners android:radius="@dimen/volume_dialog_panel_width_half"/> </shape> </item> </layer-list> No newline at end of file
packages/SystemUI/res/drawable/volume_row_seekbar.xml +14 −29 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ ~ 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. Loading @@ -19,33 +18,19 @@ and a bottom-aligned icon) and a progress layer (with an accent-colored round rect and icon) that moves up and down with the progress value. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:paddingMode="stack" > <item android:id="@android:id/background" android:gravity="center_vertical|fill_horizontal"> <layer-list> <item android:id="@+id/volume_seekbar_background_solid"> <inset android:insetLeft="@dimen/rounded_slider_track_inset" android:insetRight="@dimen/rounded_slider_track_inset" > <shape> <size android:height="@dimen/volume_dialog_slider_width" /> <solid android:color="?android:attr/colorBackgroundFloating" /> <corners android:radius="@dimen/volume_dialog_slider_corner_radius" /> <size android:height="@dimen/volume_dialog_track_width" /> <corners android:radius="@dimen/volume_dialog_track_corner_radius" /> <solid android:color="?androidprv:attr/colorAccentSecondaryVariant" /> </shape> </item> <item android:id="@+id/volume_seekbar_background_icon" android:gravity="center_vertical|left" android:height="@dimen/rounded_slider_icon_size" android:width="@dimen/rounded_slider_icon_size" android:left="@dimen/rounded_slider_icon_inset"> <rotate android:fromDegrees="-270" android:toDegrees="-270"> <!-- A placeholder drawable is required here - it'll be replaced in code. --> <com.android.systemui.util.AlphaTintDrawableWrapper android:drawable="@drawable/ic_volume_media" android:tint="?android:attr/colorAccent" /> </rotate> </item> </layer-list> </inset> </item> <item android:id="@android:id/progress" android:gravity="center_vertical|fill_horizontal"> Loading
packages/SystemUI/res/drawable/volume_row_seekbar_progress.xml +4 −3 Original line number Diff line number Diff line Loading @@ -18,12 +18,13 @@ <!-- Progress drawable for volume row SeekBars. This is the accent-colored round rect that moves up and down as the progress value changes. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:autoMirrored="true"> <item android:id="@+id/volume_seekbar_progress_solid"> <shape> <size android:height="@dimen/volume_dialog_panel_width" /> <size android:height="@dimen/volume_dialog_slider_width" /> <solid android:color="?android:attr/colorAccent" /> <corners android:radius="@dimen/volume_dialog_panel_width_half"/> <corners android:radius="@dimen/volume_dialog_slider_corner_radius"/> </shape> </item> <item Loading @@ -38,7 +39,7 @@ <!-- A placeholder drawable is required here - it'll be replaced in code. --> <com.android.systemui.util.AlphaTintDrawableWrapper android:drawable="@drawable/ic_volume_media" android:tint="?android:attr/colorBackgroundFloating" /> android:tint="?androidprv:attr/colorAccentPrimaryVariant" /> </rotate> </item> </layer-list> No newline at end of file
packages/SystemUI/res/layout/volume_dialog.xml +71 −67 Original line number Diff line number Diff line Loading @@ -16,31 +16,37 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:id="@+id/volume_dialog_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:layout_gravity="right" android:paddingRight="@dimen/volume_dialog_stream_padding" android:clipToPadding="false" android:background="@android:color/transparent" android:theme="@style/volume_dialog_theme"> <!-- right-aligned to be physically near volume button --> <LinearLayout android:id="@+id/volume_dialog" android:minWidth="@dimen/volume_dialog_panel_width" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:layout_gravity="right" android:background="@android:color/transparent" android:paddingRight="@dimen/volume_dialog_panel_transparent_padding_right" android:paddingLeft="@dimen/volume_dialog_panel_transparent_padding" android:layout_marginRight="@dimen/volume_dialog_panel_transparent_padding_right" android:orientation="vertical" android:clipToPadding="false" android:clipChildren="false"> <LinearLayout android:id="@+id/volume_dialog_ringer_and_rows_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:padding="7dp" android:clipChildren="false" android:background="@drawable/volume_background"> <include layout="@layout/volume_ringer_drawer" /> <FrameLayout Loading Loading @@ -75,7 +81,6 @@ <LinearLayout android:id="@+id/main" android:minWidth="@dimen/volume_dialog_panel_width" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" Loading @@ -87,7 +92,6 @@ android:id="@+id/volume_dialog_rows" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="@dimen/volume_dialog_panel_width" android:gravity="center" android:orientation="horizontal" android:layout_marginTop="@dimen/volume_row_slider_padding_start"> Loading @@ -105,25 +109,26 @@ android:layout_gravity="center" android:contentDescription="@string/accessibility_volume_settings" android:background="@drawable/ripple_drawable_20dp" android:tint="?android:attr/colorBackgroundFloating" android:tint="?androidprv:attr/colorAccent" android:soundEffectsEnabled="false" /> </FrameLayout> </LinearLayout> </LinearLayout> <FrameLayout android:id="@+id/odi_captions" android:layout_width="@dimen/volume_dialog_caption_size" android:layout_height="@dimen/volume_dialog_caption_size" android:layout_marginTop="@dimen/volume_dialog_spacer" android:layout_marginTop="@dimen/volume_dialog_row_margin_bottom" android:gravity="right" android:layout_gravity="right" android:layout_gravity="center" android:clipToPadding="false" android:background="@drawable/rounded_bg_full"> android:background="@drawable/volume_background"> <com.android.systemui.volume.CaptionsToggleImageButton android:id="@+id/odi_captions_icon" android:src="@drawable/ic_volume_odi_captions_disabled" style="@style/VolumeButtons" android:background="@drawable/rounded_ripple" android:layout_width="match_parent" android:layout_height="match_parent" android:tint="?android:attr/colorAccent" Loading @@ -131,7 +136,6 @@ android:soundEffectsEnabled="false" sysui:optedOut="false"/> </FrameLayout> </LinearLayout> <ViewStub Loading
packages/SystemUI/res/layout/volume_dialog_row.xml +5 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:tag="row" android:layout_height="wrap_content" android:layout_width="@dimen/volume_dialog_panel_width" android:layout_width="@dimen/volume_dialog_slider_width" android:clipChildren="false" android:clipToPadding="false" android:translationZ="@dimen/volume_dialog_elevation" Loading @@ -25,7 +25,7 @@ <LinearLayout android:layout_height="wrap_content" android:layout_width="@dimen/volume_dialog_panel_width" android:layout_width="@dimen/volume_dialog_slider_width" android:gravity="center" android:layout_gravity="center" android:orientation="vertical" > Loading Loading @@ -54,7 +54,9 @@ android:layout_width="@dimen/volume_row_slider_height" android:layout_height="match_parent" android:layout_gravity="center" android:thumb="@android:color/transparent" android:thumb="@null" android:splitTrack="false" android:progressDrawable="@drawable/volume_row_seekbar" android:rotation="270" /> </FrameLayout> Loading