69a17f5705
The main change here is that the volume rows draw their own rounded backgrounds, aside from the last row, which draws no background since it's already on top of the main dialog background. The ringer icon and the ellipsis also now handle drawing their own rounded backgrounds, rather than having the container handle it. The container needs to draw the background for the main ringer row for Z-ordering reasons. There's also some drawable trickery to get the landscape drawer expansion to work, so that it has a rounded background behind it when expanded. Test: in portrait/landscape, with multiple rows (by using talkback/phone call), and in RTL Fixes: 187202281 Fixes: 188038844 Fixes: 182833291 Change-Id: If969d29780f99b1454edd24e85e51a5d0ebe5d6d
94 lines
3.8 KiB
XML
94 lines
3.8 KiB
XML
<!--
|
|
~ 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
|
|
-->
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:sysui="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/volume_dialog_container"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@android:color/transparent"
|
|
android:theme="@style/volume_dialog_theme">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/volume_dialog"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="right"
|
|
android:background="@android:color/transparent"
|
|
android:padding="@dimen/volume_dialog_panel_transparent_padding"
|
|
android:clipToPadding="false">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/volume_dialog_rows_container"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="right"
|
|
android:orientation="vertical"
|
|
android:translationZ="@dimen/volume_dialog_elevation"
|
|
android:clipChildren="false"
|
|
android:clipToPadding="false"
|
|
android:background="@android:color/transparent">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/volume_dialog_rows"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:orientation="horizontal"
|
|
android:background="@drawable/tv_volume_dialog_background">
|
|
<!-- volume rows added and removed here! :-) -->
|
|
</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_marginRight="68dp"
|
|
android:layout_gravity="right"
|
|
android:clipToPadding="false"
|
|
android:translationZ="@dimen/volume_dialog_elevation"
|
|
android:background="@drawable/rounded_bg_full">
|
|
|
|
<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="@color/caption_tint_color_selector"
|
|
android:layout_gravity="center"
|
|
android:soundEffectsEnabled="false"
|
|
sysui:optedOut="false"/>
|
|
|
|
</FrameLayout>
|
|
|
|
<ViewStub
|
|
android:id="@+id/odi_captions_tooltip_stub"
|
|
android:inflatedId="@+id/odi_captions_tooltip_view"
|
|
android:layout="@layout/volume_tool_tip_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginRight="@dimen/volume_tool_tip_right_margin"
|
|
android:layout_marginTop="@dimen/volume_tool_tip_top_margin"
|
|
android:layout_gravity="right"/>
|
|
|
|
</FrameLayout>
|
|
|
|
</FrameLayout>
|