Delay after pressing a button

Posted by KrLx_roller on Stack Overflow See other posts from Stack Overflow or by KrLx_roller
Published on 2012-03-28T12:20:23Z Indexed on 2012/07/05 21:16 UTC
Read the original article Hit count: 292

Filed under:
|
|
|

After I press a button, Android parse a JSON file and pick the info it needs. Until yesterday, I was using an external library created by a user and it worked perfectly. But now, I don't want to depend on him, so I've searching info about Google's GSON. I've implemented this library with no problem, but now, after pressing the button that opens a new activity there's a delay.

This delay is due to the connection and parsing that are done before the activity shows.

How can I force the app to wait the Internet connection until de Activity is shown? It's a lil bit uncomfortable because after pressing the button, it seems that the app has frozen, but after all data is loaded, the new activity appears.

Thank you in advance!

© Stack Overflow or respective owner

Related posts about android

Related posts about button