Advertisement
canergural

asynctask örnek 9 Eki 13

Oct 9th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public class BirSeylerBirSeyler extends AsyncTask<String, Void, String>{
  2.  
  3.     TextView mSonucTextView;
  4.  
  5.     public DownloadImageTask(TextView tv) {
  6.         //parametre olarak verdiğimiz bu TextView'ı
  7.         //onCreate() sırasında örneklemiş olmalıyız.
  8.         this.mSonucTextView=tv;
  9.     }
  10.  
  11.     @Override
  12.     protected String doInBackground(String... parametreler) {
  13.         String sonuc=null;
  14.         /*
  15.             işledi, işledi
  16.         */
  17.         return sonuc; //burası çok önemli. onPostExecute()'a
  18.     }
  19.     protected void onPostExecute(String sonucumuz) {
  20.         mSonucTextView.setText(sonucumuz);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement