diff options
| author | 2022-11-02 17:42:06 +0000 | |
|---|---|---|
| committer | 2022-11-03 11:45:18 +0000 | |
| commit | e8a9a81b6d54c94c47cae0f900250ad781e5f6c3 (patch) | |
| tree | 0f6243f61c254c04b51d1c9f1349c7d1156d1b15 | |
| parent | 6e7f90aede934aef586c33c221abdb74572a7c5a (diff) | |
Better support portrait mode for foldables
Specs for tablets (wide & tall devices) were getting applied to
foldables when in portrait mode. These spacings were far too large for
the shorter screen.
Fixes: 256865630
Test: Manual - Use all display size combinations on foldables/tablets
Change-Id: I102d39850706c81287991569b21bd9a01be84ca8
4 files changed, 49 insertions, 4 deletions
diff --git a/packages/SystemUI/res/values-sw600dp-h900dp/dimens.xml b/packages/SystemUI/res/values-sw600dp-h900dp/dimens.xml new file mode 100644 index 000000000000..aab914f19878 --- /dev/null +++ b/packages/SystemUI/res/values-sw600dp-h900dp/dimens.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2022 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. + --> + +<!-- Intended for wide devices that are currently oriented with a lot of available height, + such as tablets. 'hxxxdp' is used instead of 'port' in order to avoid this being applied + to wide devices that are shorter in height, like foldables. --> +<resources> + <!-- Space between status view and notification shelf --> + <dimen name="keyguard_status_view_bottom_margin">35dp</dimen> + <dimen name="keyguard_clock_top_margin">40dp</dimen> +</resources> diff --git a/packages/SystemUI/res/values-sw600dp-port/dimens.xml b/packages/SystemUI/res/values-sw600dp-port/dimens.xml index 347cf2965c77..d9df3373bef1 100644 --- a/packages/SystemUI/res/values-sw600dp-port/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-port/dimens.xml @@ -17,8 +17,6 @@ <resources> <dimen name="notification_panel_margin_horizontal">48dp</dimen> <dimen name="status_view_margin_horizontal">62dp</dimen> - <dimen name="keyguard_clock_top_margin">40dp</dimen> - <dimen name="keyguard_status_view_bottom_margin">40dp</dimen> <dimen name="bouncer_user_switcher_y_trans">20dp</dimen> <!-- qs_tiles_page_horizontal_margin should be margin / 2, otherwise full space between two diff --git a/packages/SystemUI/res/values-sw720dp-h1000dp/dimens.xml b/packages/SystemUI/res/values-sw720dp-h1000dp/dimens.xml new file mode 100644 index 000000000000..97ead01669a9 --- /dev/null +++ b/packages/SystemUI/res/values-sw720dp-h1000dp/dimens.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2022 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. + --> +<!-- Intended for wide devices that are currently oriented with a lot of available height, + such as tablets. 'hxxxdp' is used instead of 'port' in order to avoid this being applied + to wide devices that are shorter in height, like foldables. --> +<resources> + <!-- Space between status view and notification shelf --> + <dimen name="keyguard_status_view_bottom_margin">70dp</dimen> + <dimen name="keyguard_clock_top_margin">80dp</dimen> +</resources> diff --git a/packages/SystemUI/res/values-sw720dp-port/dimens.xml b/packages/SystemUI/res/values-sw720dp-port/dimens.xml index 3d8da8a6c3e8..17f82b50d7be 100644 --- a/packages/SystemUI/res/values-sw720dp-port/dimens.xml +++ b/packages/SystemUI/res/values-sw720dp-port/dimens.xml @@ -21,8 +21,6 @@ for different hardware and product builds. --> <resources> <dimen name="status_view_margin_horizontal">124dp</dimen> - <dimen name="keyguard_clock_top_margin">80dp</dimen> - <dimen name="keyguard_status_view_bottom_margin">80dp</dimen> <dimen name="bouncer_user_switcher_y_trans">200dp</dimen> <dimen name="large_screen_shade_header_left_padding">24dp</dimen> |