Skip to content

Instantly share code, notes, and snippets.

@gregwk
Last active April 19, 2019 23:38
Show Gist options
  • Save gregwk/2e8789334ca70b6bd2e3b92825253c9d to your computer and use it in GitHub Desktop.
Save gregwk/2e8789334ca70b6bd2e3b92825253c9d to your computer and use it in GitHub Desktop.
Inner class FetchItemsTask in GalleryFragment
private class FetchItemsTask extends AsyncTask<Void, Void, List<GalleryItem>> {
@Override
protected List<GalleryItem> doInBackground(Void... params) {
return new FlickrFetcher().fetchItems();
}
@Override
protected void onPostExecute(List<GalleryItem> items) {
mItems = items;
refreshView();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment