Android - Custom Dialog - Can't get text from EditText

前端 未结 6 771
清歌不尽
清歌不尽 2020-12-01 12:00

I have a problem with a custom dialog.
My dialog consists of a TextView, EditText and an \"Ok\" Button. After clicking \"Ok\", it should get t

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 12:30

    EditText editText = (EditText) findViewById(R.id.edit_message);
    String message = editText.getText().toString();
    

    http://developer.android.com/training/basics/firstapp/starting-activity.html

提交回复
热议问题