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

Commit bfb27dce authored by Austin Tankiang's avatar Austin Tankiang
Browse files

Fix job panel display issues in RTL

- The popup displays in the wrong location, so use gravity to position
  it instead of an x offset.
- The signal title message text view has the text always pushed to the
  left, so change the alignment.

Bug: 412566817
Test: atest -c 'DocumentsUIGoogleTests:com.android.documentsui.JobPanelUiTest'
Flag: com.android.documentsui.flags.visual_signals_ro
Change-Id: Ie54f75dc2331736009443ba84da2066ace0fefa4
parent f8b1f9be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@

    <style name="JobProgressItemTitleStyle" parent="">
        <item name="android:textAppearance">@style/JobProgressItemTitleText</item>
        <item name="android:textAlignment">viewStart</item>
    </style>

    <style name="JobProgressItemTitleStyle.Collapsed">
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.IntentFilter
import android.graphics.Rect
import android.text.format.Formatter
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.MenuItem
import android.view.View
@@ -321,8 +322,9 @@ class JobPanelController(private val activityContext: Context) : BroadcastReceiv
                setOnDismissListener { progressListAdapter = null }
                showAsDropDown(
                    /* anchor= */ view,
                    /* xoff= */ view.width - popupWidth.toInt(),
                    /* yoff= */ 0
                    /* xoff= */ 0,
                    /* yoff= */ 0,
                    /* gravity= */ Gravity.TOP or Gravity.END,
                )
            }
        }