Back to project page Fruity-Bang.
The source code is released under:
MIT License
If you think the Android project Fruity-Bang listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package vn.edu.rmit.fruitybang; /*from w ww . ja v a 2 s . c om*/ import Game.Game; import android.app.Dialog; import android.os.AsyncTask; import android.util.Log; public class LoadingAsyncTask extends AsyncTask<Void, Void, Void> { private Dialog dialog; private Game game; public LoadingAsyncTask(Dialog dialog, Game game) { this.dialog = dialog; this.game = game; } @Override public Void doInBackground(Void... params) { try { while (!game.isFinished()) { Thread.sleep(3000); Log.i("Fruity", "Thread sleep for 3 second"); } Thread.sleep(5000); } catch (Exception e) { Log.i("Fruity", "Catched Exception " + e.toString()); } finally { dialog.dismiss(); } return null; } }