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

Commit be7b9e4e authored by Longbo Wei's avatar Longbo Wei
Browse files

a11y: Fix - Correct scroll panel button vertical alignment

Problem: Scroll panel buttons (center, sides, bottom) appeared slightly
misaligned vertically.

Cause: The panel background drawable is 184dp(180+4) tall after we add a
4dp shadow path at the bottom. This shifts the visual shape boundaries
relative to the layout boundaries.

Solution: Move the 184dp height background to the parent, and change the
parent height to 184dp,therefore the background is not squeezed

Screenshot(make the button background to be white for better
visibility):
- before: http://screen/7VbaC8WYVY3D5SD
- after:  http://screen/3xw8EsehZNRCXbH

Bug: b/400964604
Test: AutoclickControllerTest
Flag: com.android.server.accessibility.enable_autoclick_indicator
Change-Id: I8d66fda0c9eb67a2b0a540ab2cd36b5ddf7ffbf1
parent fbdf66be
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -16,16 +16,16 @@
-->
<com.android.server.accessibility.autoclick.AutoclickLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/accessibility_autoclick_scroll_panel"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_width="180dp"
    android:layout_height="184dp"
    android:layout_gravity="center"
    android:orientation="vertical">
    android:orientation="vertical"
    android:background="@drawable/accessibility_autoclick_scroll_panel_container">

    <RelativeLayout
        android:layout_width="180dp"
        android:layout_height="180dp"
        android:padding="3dp"
        android:background="@drawable/accessibility_autoclick_scroll_panel_container">
        android:padding="3dp">

        <!-- Up arrow at the top -->
        <ImageButton