Back to project page droidcon-android-espresso.
The source code is released under:
Apache License
If you think the Android project droidcon-android-espresso listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.xrigau.droidcon.espresso.loader; // ww w.jav a2 s .c om import android.app.LoaderManager; import android.content.Context; import android.content.Loader; import android.os.Bundle; import com.xrigau.droidcon.core.model.PostList; public class PostsTaskLoaderCallbacks implements LoaderManager.LoaderCallbacks<PostList> { private final Context context; private final LoaderListener<PostList> listener; public PostsTaskLoaderCallbacks(Context context, LoaderListener<PostList> listener) { this.context = context; this.listener = listener; } @Override public Loader onCreateLoader(int id, Bundle args) { listener.onLoadStarted(); return new PostsTaskLoader(context); } @Override public void onLoadFinished(Loader<PostList> loader, PostList posts) { listener.onLoadFinished(posts); } @Override public void onLoaderReset(Loader<PostList> loader) { listener.onLoadStarted(); } }