Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a17f57 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Fixes issues with multiple ringer rows (which also addresses a few RTL/landscape issues).

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
parent 04b48353
Loading
Loading
Loading
Loading
+23 −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
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <size android:width="@dimen/volume_dialog_panel_width" />
    <solid android:color="?androidprv:attr/colorSurface" />
    <corners android:bottomLeftRadius="@dimen/volume_dialog_panel_width_half"
        android:bottomRightRadius="@dimen/volume_dialog_panel_width_half"/>
</shape>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
        <shape>
            <size android:width="@dimen/volume_dialog_panel_width" />
            <solid android:color="?androidprv:attr/colorSurface" />
            <corners android:radius="@dimen/volume_dialog_panel_width_half"/>
            <corners android:topLeftRadius="@dimen/volume_dialog_panel_width_half"
                android:topRightRadius="@dimen/volume_dialog_panel_width_half"/>
        </shape>
    </item>
</layer-list>
 No newline at end of file
+29 −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:topLeftRadius="@dimen/volume_dialog_panel_width_half"
                android:topRightRadius="@dimen/volume_dialog_panel_width_half"
                android:bottomLeftRadius="@dimen/volume_dialog_panel_width_half"
                android:bottomRightRadius="@dimen/volume_dialog_panel_width_half"/>
        </shape>
    </item>
</layer-list>
 No newline at end of file
+23 −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
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <size android:width="@dimen/volume_dialog_panel_width" />
    <solid android:color="?androidprv:attr/colorSurface" />
    <corners android:radius="@dimen/volume_dialog_panel_width_half"/>
</shape>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@
        android:clipToPadding="false">

        <LinearLayout
            android:id="@+id/main"
            android:id="@+id/volume_dialog_rows_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
Loading