set focus in unfilled edittext how can implemented android application

Posted by narasimha on Stack Overflow See other posts from Stack Overflow or by narasimha
Published on 2010-04-22T05:32:20Z Indexed on 2010/04/23 19:53 UTC
Read the original article Hit count: 693

Filed under:

hi

I am implementing one application gust i am adding validations in login page implemented then two fields required username and password button login i am applying validations then focus are not getting then set focus in unfilled edittext

>

 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 { ........................... }

not filling username then filling password then username entered some toast displayed fine focus are entered in username edittext this is the problem how can implemented focus in unfilled username

© Stack Overflow or respective owner

Related posts about android