Does EditText.getText() ever returns null?

后端 未结 7 831
粉色の甜心
粉色の甜心 2020-11-30 09:31

All over the net I see examples like edittext.getText().toString(). I do not see any null check. In docs I do not see any statement that would say that this wil

7条回答
  •  抹茶落季
    2020-11-30 10:07

    it will return null because when apps runs its empty and it returns null, use .getText.toString inside a button click listener, now when you click button it will get the text which you have entered on editText.

提交回复
热议问题