How to get text from EditText?

前端 未结 7 1945
旧时难觅i
旧时难觅i 2021-01-01 12:21

The question is quite simple. But I want to know where exactly do we make our references to the gui elements? As in which is the best place to define:

final          


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-01 12:56

    The quickest solution to your problem I believe is that you simply are missing parentheses on your getText. Simply add () to edit.getText().toString() and that should solve it

提交回复
热议问题