I am using com.google.android.material.textfield.TextInputLayout, and trying to achive input field appearance like on the first image:
But it renders error message this way:
How to make it look like on the first picture?
UPDATE: This is my xml:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilEmail"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@id/ivContactIcon"
app:layout_constraintEnd_toEndOf="@id/gEnd"
app:layout_constraintTop_toBottomOf="@id/tilHomePhone"
app:errorEnabled="true"
android:hint="@string/profile_edit_hint_email"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etEmail"
style="@style/FontRoboRegularSizeMFontPrimaryOneLineMatchWrap"
android:inputType="textEmailAddress"
android:imeOptions="actionDone"
/>
</com.google.android.material.textfield.TextInputLayout>