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

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

    yesButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View arg0) {
            eiteText=(EditText)findViewById(R.id.nameET);
            String result=eiteText.getText().toString();
            Log.d("TAG",result);
        }
    });
    

提交回复
热议问题