Issue
I'm building a Sign Up screen and i want to show a helper text on a EditText, i am using material but isn't showing. I've checked the google docs and i think i did nothing bad. Here's my edittext code
<com.google.android.material.textfield.TextInputLayout
android:layout_width="411dp"
android:layout_height="164dp"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/createAccountSubTextView">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/usernameEditText"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="32dp"
android:background="@drawable/custom_login_edittext"
android:drawableStart="@drawable/ic_person"
android:drawablePadding="20dp"
android:drawableTint="@color/gris_oscuro"
android:ems="10"
android:hint="Username"
android:inputType="textPersonName"
android:paddingStart="20dp"
android:textColor="@color/white"
app:helperText="ddffef"
app:helperTextEnabled="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/createAccountSubTextView" />
</com.google.android.material.textfield.TextInputLayout>
This is the result Result
Also i'm trying to remove the white border above the edittext but it's not possible, someone can help me? Thanks in advance!!
Solution
Here is the code to reproduce content bellow (here is the doc)
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:hint="Numéro de téléphone ou Email"
app:boxBackgroundColor="@color/grey_5"
app:boxCornerRadiusBottomEnd="@dimen/spacing_middle"
app:boxCornerRadiusBottomStart="@dimen/spacing_middle"
app:boxCornerRadiusTopEnd="@dimen/spacing_middle"
app:boxCornerRadiusTopStart="@dimen/spacing_middle"
app:boxStrokeWidth="1dp"
app:startIconDrawable="@drawable/ic_phone"
app:startIconTint="@color/grey_40"
app:helperText="Veuillez remplir ce champs"
app:placeholderTextColor="@color/grey_40">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
Answered By - logancodemaker
Answer Checked By - Candace Johnson (JavaFixing Volunteer)