My Scenario is following:
- User open application, with profile class
- At this point userDTO.getMobile - is empty AND artistDetails.getName - is empty too
- When user fills up his profile, then userDTO.getMobile still EMPTY, AND artistDetails.getName NOT empty
I need to make the following:
- if getMobile AND getName are empty display HELLO
- if getMobile, BUT getName is NOT empty display GOODBYE
I have right now, the following:
if (userDTO.getMobile().isEmpty() && artistDetailsDTO.getName().isEmpty()) {
ProjectUtils.showToast(getActivity(), "HELLO");
} else if (artistDetailsDTO.getName().matches("[a-zA-Z]+")) {
ProjectUtils.showToast(getActivity(), "GOODBYE");
}
But, in anycase I'm displaying HELLO in casy, cannot understand Why..
I fill up profile, so I expecting, that
- username.getMobile.isEmpty
- artistDetails.userName.matches...
- So, I must show - GOOD BYE.
Can You assist me, please?
Thank you
Aucun commentaire:
Enregistrer un commentaire