Check this link for the guidelines on creating the new Material Design textfield you want.
https://material.io/design/components/text-fields.html#usage
- for how to use it:
To create a material text field, add a TextInputLayout to your XML layout and a TextInputEditText as a direct child.
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_text"/>
</com.google.android.material.textfield.TextInputLayout>
Note: You can also use an EditText for your input text component. However, using TextInputEditText allows TextInputLayout greater control over the visual aspects of the input text - it allows TextInputLayout to display hint in the text field when in “extract mode” (such as landscape mode).
- for styling it:
Filled Box (Default)
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
Outline Box
style="@style/Widget.MaterialComponents.TextInputLayout.OutlineBox"
For more, check this link:
https://material.io/develop/android/components/text-input-layout/
I hope this will help.