From 5d5a945fed165e317b9d8dc4f4b81b8d85f938a7 Mon Sep 17 00:00:00 2001 From: Yuri Lin Date: Tue, 2 Jul 2024 18:13:41 -0400 Subject: [PATCH] Right-align "end time" portion of the schedule setter. This is more like what the mocks show. To make it happen, this changes the layout to a ConstraintLayout with a guideline in the middle to make sure that the start and end time sections take up no more than half the screen. Confirmed that it wraps rather than overlapping when the text becomes too large. Flag: android.app.modes_ui Bug: 346396147 Test: manual Change-Id: I56adbd24594121a9cb5b4374f2eeecdfd40f61e4 --- res/layout/modes_set_schedule_layout.xml | 105 +++++++++++++---------- 1 file changed, 60 insertions(+), 45 deletions(-) diff --git a/res/layout/modes_set_schedule_layout.xml b/res/layout/modes_set_schedule_layout.xml index 5758cfb4be2..ebb349e014c 100644 --- a/res/layout/modes_set_schedule_layout.xml +++ b/res/layout/modes_set_schedule_layout.xml @@ -30,63 +30,78 @@ android:paddingBottom="24dp"> - - - + + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toStartOf="@+id/guideline" + app:layout_constraintStart_toStartOf="parent" + app:layout_constrainedWidth="true" + app:layout_constraintHorizontal_bias="0" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Medium" + android:text="@string/zen_mode_start_time" /> - - - - - - - - + + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/start_time_label" + app:layout_constraintEnd_toStartOf="@+id/guideline" + app:layout_constrainedWidth="true" + app:layout_constraintHorizontal_bias="0" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Title" + android:textColor="?android:attr/colorAccent" + android:textSize="40sp" /> - + + - + + - + + - +