Take the 2-minute tour ×

I am creating a login register page which contains two edit text boxes(one for username and other for password) and one login button. The user should not be able to enter without filling out the required information in the text boxes. How can I achieve this?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

To be honest, this is really basic. I won't give you the code, because i want you to search for it, already tried google?

To do this you have to do the following steps,

  1. create an if statement and check wether the textboxes are empty.
  2. then in your if statement you can start an activity with the intent you made. (if you already have an intent?)

And if you can't do it.. Try to search on:

  • check if textbox is empty (android) (java)
  • start an activity (android)


share|improve this answer
add comment

Your Answer


