Right-align "end time" text on the schedule setter

When the "end time" text label is wider than the actual time, then aligning it with the start of the time causes it to wrap, even when there's plenty more space on the screen. This change right-aligns it in all cases (even when it's shorter), as it's hard to get all three of "right-aligned when too long", "left-aligned to the time display when short enough", and "wraps when it hits the center line instead of overflowing".

Fixes: 367054151
Test: manual, in English & Danish
Flag: android.app.modes_ui
Change-Id: I106864d6fb09aeac5fcc8d22e8d3d67b1b31ce4e
This commit is contained in:
Yuri Lin
2024-09-17 15:41:04 -04:00
parent 636e90be58
commit 300d3d14c3

View File

@@ -73,18 +73,17 @@
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<!-- End time title (non-clickable preference), left-aligned to edge of time display -->
<!-- End time title (non-clickable preference), right-aligned -->
<TextView
android:id="@+id/end_time_label"
android:clickable="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@+id/end_time"
app:layout_constraintStart_toEndOf="@+id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constrainedWidth="true"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_bias="1"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/zen_mode_end_time"
android:importantForAccessibility="no" />