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

Commit 34cedd48 authored by Evan Laird's avatar Evan Laird
Browse files

Allow separate top and bottom rounded.xml layouts

ScreenDecorations expects that the overlays for the top and bottom
(containing the rounded corners and potentially display cutout) will
have the exact same drawable on all 4 corners. This change allows for
two separate layouts divided into top and bottom.

Test: manual
Bug: 156017682
Change-Id: Icbfaf66b19a6d154dd67ce2d9bc013a29778c329
parent 6affc270
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2020 The Android Open Source Project

    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.
-->
<!-- Overlay this resource to change rounded_corners_bottom -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/rounded"/>
+16 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2020 The Android Open Source Project

    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.
-->
<!-- Overlay this resource to change rounded_corners_top -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/rounded"/>
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
-->
<com.android.systemui.RegionInterceptingFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rounded_corners_default"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 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.
-->
<com.android.systemui.RegionInterceptingFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rounded_corners_bottom"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/left"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:layout_gravity="left|bottom"
        android:tint="#ff000000"
        android:src="@drawable/rounded_corner_bottom"/>
    <ImageView
        android:id="@+id/right"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:tint="#ff000000"
        android:layout_gravity="right|bottom"
        android:src="@drawable/rounded_corner_bottom"/>
</com.android.systemui.RegionInterceptingFrameLayout>
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 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.
-->
<com.android.systemui.RegionInterceptingFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rounded_corners_top"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/left"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:layout_gravity="left|top"
        android:tint="#ff000000"
        android:src="@drawable/rounded_corner_top"/>
    <ImageView
        android:id="@+id/right"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:tint="#ff000000"
        android:layout_gravity="right|top"
        android:src="@drawable/rounded_corner_top"/>
</com.android.systemui.RegionInterceptingFrameLayout>
Loading