Last active
May 15, 2017 00:31
-
-
Save julianfalcionelli/1660750db92ce18d543d274ea5ed5dd5 to your computer and use it in GitHub Desktop.
AsyncTask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
new AsyncTask<Void, Void, String>() { | |
@Override | |
protected void onPreExecute() { | |
//... | |
} | |
@Override | |
protected String doInBackground(Void... voids) { | |
return performBlockingTask(); | |
} | |
@Override | |
protected void onProgressUpdate(Integer... progress) { | |
mProgessBar.setProgress(progress); | |
} | |
@Override | |
protected void onPostExecute(String result) { | |
mTextView.setText(result); | |
} | |
}.execute(); | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment