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

Commit 995553c3 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Fix the live caption tooltip, which was sad and broken.

- Position it correctly using getLocationOnScreen since the dialog height is now variable.
- Update colors so it's readable in dark mode.
- Make it touchable so it can be dismissed without dismissing the entire volume dialog.

Fixes: 184624161
Test: commented out setting tooltip seen so I could experiment with it
Change-Id: I44ba0f9a5488edf88a63ff4842e9abc27e1ce408
parent 09f82e22
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@
        android:layout="@layout/volume_tool_tip_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom | right"/>
        android:layout_gravity="bottom | right"
        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/>

</FrameLayout>
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom | right"
        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"
        android:layout_marginBottom="@dimen/volume_tool_tip_bottom_margin"/>
        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/>

</FrameLayout>
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

<com.android.systemui.volume.VolumeToolTipView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:id="@+id/tooltip_view"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
@@ -35,7 +36,7 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textColor="@android:color/white"
            android:textColor="?android:attr/textColorPrimaryInverse"
            android:text="@string/volume_odi_captions_tip"
            android:textSize="14sp"/>
        <ImageView
@@ -48,7 +49,7 @@
            android:layout_marginEnd="2dp"
            android:alpha="0.7"
            android:src="@drawable/ic_remove_no_shadow"
            android:tint="@android:color/white"
            android:tint="?android:attr/textColorPrimaryInverse"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/accessibility_volume_close_odi_captions_tip"/>
    </LinearLayout>
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
  <dimen name="volume_dialog_slider_width">4dp</dimen>
  <dimen name="volume_dialog_slider_corner_radius">@dimen/volume_dialog_slider_width</dimen>
  <dimen name="volume_dialog_background_blur_radius">100dp</dimen>
  <dimen name="volume_tool_tip_right_margin">136dp</dimen>

  <dimen name="tv_volume_dialog_bubble_size">36dp</dimen>
  <dimen name="tv_volume_dialog_row_padding">6dp</dimen>
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@

    <dimen name="qs_detail_margin_top">14dp</dimen>

    <dimen name="volume_tool_tip_right_margin">136dp</dimen>
    <dimen name="volume_tool_tip_top_margin">12dp</dimen>
    <dimen name="volume_row_slider_height">128dp</dimen>

Loading