Add a header before the icon list in the new/rename mode screen

Also fixed paddings a bit (e.g. Done button was too close to the icon grid).

Fixes: 369503296
Test: manual
Flag: android.app.modes_ui
Change-Id: Ic7b7dc9584db1f04b448fce828a8ec70cf17f06a
This commit is contained in:
Matías Hernández
2024-09-26 15:25:01 +02:00
parent 9b36ed51a2
commit f620f85484
4 changed files with 14 additions and 9 deletions

View File

@@ -20,7 +20,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingBottom="8dp">
<EditText
android:layout_width="match_parent"

View File

@@ -28,8 +28,7 @@
android:layout_height="wrap_content"
android:clipToPadding="true"
android:nestedScrollingEnabled="false"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:padding="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -9581,6 +9581,9 @@
<!-- Modes: Hint for the EditText for editing a mode's name [CHAR LIMIT=30] -->
<string name="zen_mode_edit_name_hint">Mode name</string>
<!-- Modes: Text shown above the list of icons in the mode editor. [CHAR LIMIT=40] -->
<string name="zen_mode_edit_choose_icon_title">Choose an icon</string>
<!-- Modes: Trigger title for modes of type SCHEDULE_CALENDAR. [CHAR LIMIT=30] -->
<string name="zen_mode_trigger_title_schedule_calendar">Calendar events</string>
<!-- Modes: Trigger title for modes of type BEDTIME. [CHAR LIMIT=30] -->

View File

@@ -33,13 +33,15 @@
android:key="name"
android:layout="@layout/modes_edit_name" />
<com.android.settings.applications.SpacePreference
android:layout_height="32dp" />
<PreferenceCategory
android:title="@string/zen_mode_edit_choose_icon_title"
android:key="modes_filters">
<com.android.settingslib.widget.LayoutPreference
android:key="icon_list"
android:selectable="false"
android:layout="@layout/modes_icon_list"/>
android:layout="@layout/modes_icon_list" />
</PreferenceCategory>
<com.android.settingslib.widget.LayoutPreference
android:key="done"