How to get EditText value and display it on screen through TextView?


I want to get the user input for the EditText view and display it on the screen through TextView when the Button is clicked. I also, want to know what modifications can be done on the string.xml file to do this.

6/4/2017 4:51:00 AM

Accepted Answer

I didn't get the second question, maybe you can elaborate...but for your first query.

String content = edtEditText.getText().toString(); //gets you the contents of edit text
tvTextView.setText(content); //displays it in a textview..
12/9/2010 8:57:16 AM

I'm just beginner to help you for getting edittext value to textview. Try out this code -

EditText edit = (EditText)findViewById(;
TextView tview = (TextView)findViewById(;
String result = edit.getText().toString();

This will get the text which is in EditText Hope this helps you.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow