+ 1

How to read and display data in android

how to read from edittext and display it in textview in another activity.

6th Mar 2018, 3:58 AM
Mian Hassnain
4 Answers
+ 2
That’s very easy, try to find it by yourself Tip: just get element by id(edit text) cast it to edit text, and take a text. Then get text view by id and set it value to edittext one
6th Mar 2018, 4:31 AM
Leshark
Leshark - avatar
+ 1
something like :. EditText myEdittext =findViewById(R.id.editText1) ; String value = myEdittext.text().toString;(); I'm not sure about the last line!!! but that should give u the idea in another activity you say? then you you need an intent. to pass the value to the other activity.....
6th Mar 2018, 4:40 AM
Farshaad Heydari
Farshaad Heydari - avatar
0
I tried many many times but it wont work. can you please give me example in code form.
6th Mar 2018, 4:33 AM
Mian Hassnain
0
well done Tobias
6th Mar 2018, 9:05 AM
Farshaad Heydari
Farshaad Heydari - avatar