i wanted to show progress bar with message login success when i click on login button how can i do in android can any body guide me if possible please give the code
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See what you need to do is : when user clicks on button, start background service (here authenticating the user). You have to display progressbar when doing background processing. Depending upon result display appropriate message whether user is authorized or not say for example in Toast or another Activity.
For doing lengthy operations you have to use Thread or AsyncTask. This handles UI as well as background processes at the same time.
What you have to do is : in onClick event call the AsyncTask. Here you have to create an object of LoginOperation and then simply call its LoginOperation.execute() method.
For displaying the results, you Toast a message like :
Ofcourse you have to add it in onPostExecute() of AsyncTask.
}