Commit 43f4d9c0 authored by Ricki Hirner's avatar Ricki Hirner 🐑

Merge branch 'textlayout_errors' into 'master-ose'

Move errors from EditTexts to TextInputLayouts

See merge request !28
parents 6c0b555e b3c7f1f9
Pipeline #123006635 passed with stages
in 11 minutes and 9 seconds
......@@ -34,14 +34,14 @@
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/create_collection_display_name"
app:error="@{model.displayNameError}"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.displayName}"
app:error="@{model.displayNameError}" />
android:text="@={model.displayName}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
......
......@@ -31,6 +31,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/create_collection_display_name"
app:error="@{model.displayNameError}"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -38,8 +39,7 @@
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.displayName}"
app:error="@{model.displayNameError}" />
android:text="@={model.displayName}" />
</com.google.android.material.textfield.TextInputLayout>
<View
......
......@@ -43,12 +43,12 @@
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/login_account_name">
android:hint="@string/login_account_name"
app:error="@{details.nameError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={details.name}"
app:error="@{details.nameError}"
android:inputType="textEmailAddress"/>
</com.google.android.material.textfield.TextInputLayout>
......
......@@ -62,13 +62,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/login_email_address">
android:hint="@string/login_email_address"
app:error="@{model.usernameError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.username}"
android:autofillHints="emailAddress"
app:error="@{model.usernameError}"
android:inputType="textEmailAddress"
tools:ignore="UnusedAttribute" />
</com.google.android.material.textfield.TextInputLayout>
......@@ -77,13 +77,13 @@
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/login_password"
app:passwordToggleEnabled="true">
app:endIconMode="password_toggle"
app:error="@{model.passwordError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.password}"
android:autofillHints="password"
app:error="@{model.passwordError}"
android:fontFamily="monospace"
android:inputType="textPassword"
tools:ignore="UnusedAttribute" />
......@@ -110,25 +110,25 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/login_base_url">
android:hint="@string/login_base_url"
app:error="@{model.baseUrlError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.baseUrl}"
app:error="@{model.baseUrlError}"
android:inputType="textUri"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/login_user_name">
android:hint="@string/login_user_name"
app:error="@{model.usernameError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.username}"
android:autofillHints="username"
app:error="@{model.usernameError}"
android:inputType="textEmailAddress"
tools:ignore="UnusedAttribute" />
</com.google.android.material.textfield.TextInputLayout>
......@@ -136,15 +136,15 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:passwordToggleEnabled="true"
android:hint="@string/login_password">
android:hint="@string/login_password"
app:endIconMode="password_toggle"
app:error="@{model.passwordError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:text="@={model.password}"
android:autofillHints="password"
app:error="@{model.passwordError}"
android:inputType="textPassword"
tools:ignore="UnusedAttribute" />
</com.google.android.material.textfield.TextInputLayout>
......@@ -170,12 +170,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:hint="@string/login_base_url">
android:hint="@string/login_base_url"
app:error="@{model.baseUrlError}">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={model.baseUrl}"
app:error="@{model.baseUrlError}"
android:inputType="textUri"/>
</com.google.android.material.textfield.TextInputLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment