Search code examples
androidandroid-layouttextview

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.


Solution

  • 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..