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

前端 未结 11 1951
南旧
南旧 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:09

    EditText ein=(EditText)findViewById(R.id.edittext1);
    TextView t=new TextView(this);
    t.setText("Your Text is="+ein.getText());
    setContentView(t);
    

提交回复
热议问题