How can we achieve this things in android?
InputText of EditText on Border?
Use the TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_text">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
And apply this style:
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"