Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void asyncTaskWithInlineCallback() {
- // display UI message or indicators
- // ...
- new MyAsyncTask() {
- protected void onPostExecute(EgNetworkResult result) {
- // dismiss UI message or indicators
- // process the result
- // ...
- }
- }.execute(); // start the background processing
- }
- class MyAsyncTask extends AsyncTask<Void, Integer, Boolean> {
- @Override
- protected Boolean doInBackground(Void... arg0) {
- // do background processing and return the appropriate result
- // ...
- }
- }
Add Comment
Please, Sign In to add comment