Back to project page fieldreporter.
The source code is released under:
Apache License
If you think the Android project fieldreporter 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.donnemartin.android.fieldreporter; /* w ww . ja v a2 s. c o m*/ import android.content.Context; import android.support.v4.content.AsyncTaskLoader; public abstract class DataLoader<D> extends AsyncTaskLoader<D> { private D mData; public DataLoader(Context context) { super(context); } @Override protected void onStartLoading() { if (mData != null) { deliverResult(mData); } else { forceLoad(); } } @Override public void deliverResult(D data) { mData = data; if (isStarted()) super.deliverResult(data); } }