i am trying to do some heavy task on clicking a button and i want to change the state of the button changed instantly when i click that button but its not happening. Its changing only when the task get completed.I guess i should use multi threading as i am using interaction with webservices too.
any better solution please.
Yes, you shoud better do yoour heavy task in
AsyncTask, which is designed for performing tasks in background and notifying UI thread when it’s needed.Look at this article about threading from Google and use examples from it to rewrite your app.