Created
September 13, 2019 07:25
-
-
Save furkanaskin/204527c4927e8ea87c84c93109dea8c2 to your computer and use it in GitHub Desktop.
This file contains 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
private class MyAsyncTask extends AsyncTask<String, Void, int> { | |
protected void onPreExecute() { | |
// Ön hazırlık - UI threadinde çalışır. | |
} | |
protected int doInBackground(Void… param) { | |
// Network çağrısını burada yap. | |
} | |
protected void onProgressUpdate(String… values) { | |
// Task devam ederken burada progress göstermek gibi işlemler yapılabilir - UI threadinde çalışır. | |
} | |
protected void onPostExecute(int result) { | |
// UI'i güncelle. | |
} | |
} | |
new MyAsyncTask().execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment