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

Commit 015d9442 authored by Matthew DeVore's avatar Matthew DeVore
Browse files

Make topology hint readable when block is under it

Using the topology pane background color, draw a background behind the
hint text view.

Test: manual
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/352650922
Change-Id: I7fcee61d53460976b7d5eb10148d79bd2f9252ad
parent 5161aff8
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -31,11 +31,26 @@
        android:id="@+id/display_topology_pane_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
    <TextView
        android:id="@+id/topology_hint"

    <!-- Give the textview a solid-color background (the same as the pane) in
         order to make the text clear when a DisplayBlock is drawn under it as
         part of display_topology_pane_content.

         If the padding is in the TextView, then the background will fill the
         padding, which we don't want vertically, as there is a lot of vertical
         padding. We do need some horizontal padding because otherwise the
         rounded corners will touch the edge of the text. -->
    <FrameLayout
        android:importantForAccessibility="no"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="top|center_horizontal"
        android:paddingBottom="10dp"
        android:paddingTop="10dp" />
        android:paddingVertical="10dp">
        <TextView
            android:id="@+id/topology_hint"
            android:background="@drawable/display_topology_background"
            android:paddingHorizontal="5dp"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content" />
    </FrameLayout>
</FrameLayout>