From d51f65a0b1576d711cbc7e787f185fbab1ac37cd Mon Sep 17 00:00:00 2001 From: nift4 <nift4@protonmail.com> Date: Tue, 15 Aug 2023 14:44:56 +0200 Subject: [PATCH] core: legacy toasts deserve rounded corners too Fixes regression caused by 2de48461731828e8df4d146eb55520c1b41543ed Change-Id: Ib113ecb5270c0732b0cd550717308f775e3c8914 --- core/res/res/drawable/toast_frame_legacy.xml | 22 +++++++++++++++++++ .../res/res/layout/transient_notification.xml | 2 +- .../transient_notification_with_icon.xml | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 core/res/res/drawable/toast_frame_legacy.xml diff --git a/core/res/res/drawable/toast_frame_legacy.xml b/core/res/res/drawable/toast_frame_legacy.xml new file mode 100644 index 000000000000..aee219afbb4a --- /dev/null +++ b/core/res/res/drawable/toast_frame_legacy.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* Copyright 2017, 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" + android:shape="rectangle"> + <solid android:color="?android:attr/colorBackground" /> + <corners android:radius="28dp" /> +</shape> diff --git a/core/res/res/layout/transient_notification.xml b/core/res/res/layout/transient_notification.xml index 8bedb897dc19..49c0a37370a8 100644 --- a/core/res/res/layout/transient_notification.xml +++ b/core/res/res/layout/transient_notification.xml @@ -25,7 +25,7 @@ android:orientation="horizontal" android:gravity="center_vertical" android:maxWidth="@dimen/toast_width" - android:background="?android:attr/colorBackground" + android:background="@drawable/toast_frame_legacy" android:elevation="@dimen/toast_elevation" android:layout_marginEnd="16dp" android:layout_marginStart="16dp" diff --git a/core/res/res/layout/transient_notification_with_icon.xml b/core/res/res/layout/transient_notification_with_icon.xml index 0dfb3adc8364..142fa5ed5410 100644 --- a/core/res/res/layout/transient_notification_with_icon.xml +++ b/core/res/res/layout/transient_notification_with_icon.xml @@ -22,7 +22,7 @@ android:orientation="horizontal" android:gravity="center_vertical" android:maxWidth="@dimen/toast_width" - android:background="?android:attr/colorBackground" + android:background="@drawable/toast_frame_legacy" android:elevation="@dimen/toast_elevation" android:layout_marginEnd="16dp" android:layout_marginStart="16dp" -- GitLab