Android EditText
Android EditText:
The EditText widget in Android is used for accepting user input in the form of text. It allows users to type, edit, and submit text within an Android app.
EditText is part of the Android user interface elements and is commonly used in forms, search bars, or any other scenario where text input is required.
Example:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Edittext"
android:padding="16dp">
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:hint="Enter your name"
android:maxLines="1"/>
</FrameLayout>
Output