How can I create an android EditText, where the hint goes above the text when you tap inside and start typing?
Asked
Active
Viewed 137 times
-1

CookieMonster
- 566
- 2
- 6
- 19
-
Check this: [TextInputLayout](https://material.io/components/text-fields/android) – AskNilesh Aug 10 '22 at 08:01
1 Answers
0
Use "TextInputLayout" & "TextInputEditText"
for example
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:hint="Your Header here">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.google.android.material.textfield.TextInputLayout>

Mahmoud Tharwat
- 56
- 5