Get text string from EditText?

后端 未结 3 1211
北恋
北恋 2020-12-29 18:08

It seems I can\'t figure out how to get the text string out of EditText. I want to use the text from the EditText at pressing the button.

l

3条回答
  •  春和景丽
    2020-12-29 18:41

    EditText txtDescription =
            (EditText) layout.findViewById(R.id.txtDescription);
    
    
    String message = txtDescription.getText().toString(); 
    

提交回复
热议问题