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

前端 未结 11 2005
南旧
南旧 2020-12-05 12:45

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, w

11条回答
  •  庸人自扰
    2020-12-05 13:07

    First get the text from edit text view

    edittext.getText().toString()
    

    and Store the obtained text in a string, say value.

    value = edittext.getText().toString()
    

    Then set value as the text for textview.

    textview.setText(value)
    

提交回复
热议问题