I have an editText, How do I get the text typed in it by the user ?
example, this is my editText
<EditText
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLength="10">
</EditText>
and the user typed Hi, in my next Activity how do I make if the user typed Hi show in the next Activity Hello.. etc if the user typed How are you next activity it shows I’m fine ?
What do I use? and is it related to Database ?
First, pick up the text in the current activity, i.e. the activity where the view hosts the
EditTextcomponent.Now, add it as an extra data and call your new activity.
In
NewActivityinsideonCreate():and, voila, you have the entered text in the new activity.
To set this to the new
TextView: