Edit Text shows exception Invalid Int “”

前端 未结 5 1188
南方客
南方客 2020-12-07 04:50

I have already tried setting the EditText default value to be zero but when it comes to editing and erase as \"\" ( empty space , no more wordings _ in the Edit Text field <

5条回答
  •  没有蜡笔的小新
    2020-12-07 05:37

    try

    if(monthlyTest == null || monthlyTest.trim().equals("")){
    

    You could also use

    if(monthlyTest == null || monthlyTest.trim().isEmpty()){
    

提交回复
热议问题