Does EditText.getText() ever returns null?

后端 未结 7 833
粉色の甜心
粉色の甜心 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:02

    try in this way

    String edittext = edittext.getText().toString();
    if(edittext.length==0){ Log.d("null","the valueis null")};
    

提交回复
热议问题