We had fixed this before and then regressed when moving to TextInputLayout, so added a proper test this time. Fixes: 380207192 Test: atest ZenModeEditNamePreferenceControllerTest Flag: android.app.modes_ui Change-Id: Ic25b0a5a6997e7b3bb26bf26ed7e8e92654a1c11
53 lines
2.1 KiB
XML
53 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2024 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<!-- Theme.AppCompat.DayNight is in the parent View so that it's merged with the Theme.Settings
|
|
theme below. An AppCompat descendant (which Theme.Settings isn't) is necessary to inflate
|
|
TextInputLayout. -->
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:theme="@style/Theme.AppCompat.DayNight"
|
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/edit_input_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:theme="@style/Theme.Settings"
|
|
style="?attr/textInputFilledStyle"
|
|
app:endIconMode="clear_text"
|
|
app:errorEnabled="true"
|
|
android:hint="@string/zen_mode_edit_name_hint">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@android:id/edit"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="48dp"
|
|
android:maxLines="1"
|
|
android:inputType="text|textCapSentences"
|
|
android:imeOptions="actionDone"
|
|
android:selectAllOnFocus="true" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
</LinearLayout>
|