Home > Back-end >  Android Studio- Display one string if a button is pressed with no text in the textbox and another wh
Android Studio- Display one string if a button is pressed with no text in the textbox and another wh

Time:08-01

I am incredibly new to Android Studio and was hoping to get some assistance. For some reason, this code is only displaying the ("Hi, " name) portion. I am not sure what I am doing wrong or how to get the ("You must enter a name") portion to show when there is no text that has been inputted. We are needing to incorporate a SayHello() function into this and I am not sure if I am doing it properly... Case where user enters text in edit text Case where edit text is empty and user click button

try this and do let me know if it works !!

  • Related