Files
lawnchair/quickstep/res/layout/taskbar_edu_tooltip.xml
Brian Isganitis 58f079b134 Better handle large display and text scaling on EDU tooltip.
For large scaling configurations, the tooltip height can exceed the
available space, which can truncate important content such as the "Done"
button. To mitigate this issue, we should attempt to increase the width
of the tooltip to hopefully free up some height due to the text taking
up fewer lines.

To support dynamic width, each EDU column gets an equal weight in the
ConstraintLayout, but the lottie animations are still constrained to
their original dimensions. If they fill the width, their aspect ratio
will be maintained and we will still have height issues.

Demo: https://screenshot.googleplex.com/6jV6geJFzCYtQ6v.png

Test: Manual (transient and persistent)
Fix: 278761297
Change-Id: I8cc0c4260caef747378954225d8635b2fb8eef52
2023-05-03 18:46:47 +00:00

43 lines
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.launcher3.taskbar.TaskbarEduTooltip xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:layout_marginHorizontal="24dp"
android:paddingBottom="16dp"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
android:importantForAccessibility="yes"
android:gravity="center"
android:orientation="vertical">
<FrameLayout
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_taskbar_edu_tooltip"
android:elevation="@dimen/taskbar_edu_tooltip_elevation"
android:paddingHorizontal="@dimen/taskbar_edu_tooltip_horizontal_margin"
android:paddingVertical="@dimen/taskbar_edu_tooltip_vertical_margin" />
<View
android:id="@+id/arrow"
android:layout_width="@dimen/popup_arrow_width"
android:layout_height="@dimen/popup_arrow_height"
android:elevation="@dimen/taskbar_edu_tooltip_elevation" />
</com.android.launcher3.taskbar.TaskbarEduTooltip>