I use one application call. I add checks on the login page, then two fields require a username and password. I apply validations, and then the focus does not receive, and then sets the focus in the empty edittext.
<P → if(Username.contentEquals("")) {
> Toast.makeText(LBS.this, "Please enter
> username ",Toast.LENGTH_SHORT).show();
> } else { if( pwd.contentEquals(""))
> Toast.makeText(LBS.this, "Please enter
> password ",Toast.LENGTH_SHORT).show();
> else
> try { ........................... }
without filling in the username, and then filling out the password, then the username has entered some toasts displayed in the form of precise focus, entered into the edittext username, this is a problem how you can implement focus in an empty username
source
share