EditText
Layout
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:id="@+id/editText" android:layout_margin="16dp" android:hint="This is hint"/>
Java
EditText editText = findViewById(R.id.editText);
text = editText.getText().toString();
Last updated