¡@

Home 

2014/10/16 ¤W¤È 08:10:16

android Programming Glossary: asyncresponse

How to get the result of OnPostExecute() to main activity because AsyncTask is a separate class?

http://stackoverflow.com/questions/12575068/how-to-get-the-result-of-onpostexecute-to-main-activity-because-asynctask-is-a

question easy. create interface class. public interface AsyncResponse void processFinish String output in your Async class you need.. in your Async class you need to declare it interface AsyncResponse public class MyAsyncTask extends AsyncTask public AsyncResponse.. public class MyAsyncTask extends AsyncTask public AsyncResponse delegate null @Override protected void onPostExecute String..

Inner class can access but not update values - AsyncTask

http://stackoverflow.com/questions/18517400/inner-class-can-access-but-not-update-values-asynctask

that interface and override its method s with implements AsyncResponse in your Activity declaration after creating the separate interface.. interface class public class MainActivity implements AsyncResponse then in your Activity still you override the method you declared.. delegate.processFinish result delegate is an instance of AsyncResponse your interface class public class AasyncTask extends AsyncTask..

How to get the result of OnPostExecute() to main activity because AsyncTask is a separate class?

http://stackoverflow.com/questions/12575068/how-to-get-the-result-of-onpostexecute-to-main-activity-because-asynctask-is-a

result android android asynctask share improve this question easy. create interface class. public interface AsyncResponse void processFinish String output in your Async class you need to declare it interface AsyncResponse public class MyAsyncTask.. public interface AsyncResponse void processFinish String output in your Async class you need to declare it interface AsyncResponse public class MyAsyncTask extends AsyncTask public AsyncResponse delegate null @Override protected void onPostExecute String.. in your Async class you need to declare it interface AsyncResponse public class MyAsyncTask extends AsyncTask public AsyncResponse delegate null @Override protected void onPostExecute String result delegate.processFinish result final step in your main..

Inner class can access but not update values - AsyncTask

http://stackoverflow.com/questions/18517400/inner-class-can-access-but-not-update-values-asynctask

answer I linked to you tell the Activity that you will use that interface and override its method s with implements AsyncResponse in your Activity declaration after creating the separate interface class public class MainActivity implements AsyncResponse.. in your Activity declaration after creating the separate interface class public class MainActivity implements AsyncResponse then in your Activity still you override the method you declared in that class void processFinish String output @Override.. in onPostExecute when the listener sees that it is done with delegate.processFinish result delegate is an instance of AsyncResponse your interface class public class AasyncTask extends AsyncTask public AsyncResponse delegate null @Override protected void..