Get Value of a Edit Text field

前端 未结 12 931
既然无缘
既然无缘 2020-11-22 07:20

I am learning how to create UI elements. I have created a few EditText input fields. On the click of a Button I want to capture the content typed into that input field.

12条回答
  •  悲哀的现实
    2020-11-22 08:00

    I guess you will have to use this code when calling the "mEdit" your EditText object :

    myActivity.this.mEdit.getText().toString()

    Just make sure that the compiler know which EditText to call and use.

提交回复
热议问题