Prevent user from creating duplicate labels.
This isn't enforced at the data layer just in the UI's that
allow editting of the group name.
Bug 28718604
Change-Id: I969b0298bd895fdbdd7f8609da05f2b801707c0a
diff --git a/res/layout/group_name_edit_dialog.xml b/res/layout/group_name_edit_dialog.xml
index 9a8c69f..5df8c9d 100644
--- a/res/layout/group_name_edit_dialog.xml
+++ b/res/layout/group_name_edit_dialog.xml
@@ -14,24 +14,28 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<android.support.design.widget.TextInputLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/text_input_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:paddingBottom="24dp"
+ android:paddingEnd="24dp"
android:paddingStart="24dp"
- android:paddingEnd="24dp">
+ app:errorEnabled="true"
+ app:hintEnabled="false">
- <EditText android:id="@android:id/text1"
- xmlns:android="http://schemas.android.com/apk/res/android"
+ <android.support.design.widget.TextInputEditText
+ android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="@dimen/group_name_edit_text_min_height"
android:layout_marginBottom="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="16dp"
android:hint="@string/group_name_dialog_hint"
android:inputType="text"
- android:singleLine="true"
- android:maxLength="@integer/group_name_max_length"/>
-</LinearLayout>
\ No newline at end of file
+ android:maxLength="@integer/group_name_max_length"
+ android:minHeight="@dimen/group_name_edit_text_min_height"
+ android:singleLine="true"/>
+</android.support.design.widget.TextInputLayout>
\ No newline at end of file