Android check null or empty string in Android

前端 未结 10 1443
梦如初夏
梦如初夏 2020-12-13 12:07

In my trying AsyncTask I get email address from my server. In onPostExecute() I have to check is email address empty or null

10条回答
  •  囚心锁ツ
    2020-12-13 12:32

    if you check null or empty String so you can try this

    if (createReminderRequest.getDate() == null && createReminderRequest.getDate().trim().equals("")){
        DialogUtility.showToast(this, ProjectUtils.getString(R.string.please_select_date_n_time));
    }
    

提交回复
热议问题