Back to project page Netball.
The source code is released under:
GNU General Public License
If you think the Android project Netball 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.prisch.loaders; /*from w ww. j ava 2s .c o m*/ import android.content.AsyncTaskLoader; import android.content.Context; import com.prisch.model.GameStats; import com.prisch.repositories.StatsRepository; public class GameStatsLoader extends AsyncTaskLoader<GameStats> { private final Long gameId; private final StatsRepository statsRepository; public GameStatsLoader(Context context, Long gameId) { super(context); this.gameId = gameId; this.statsRepository = new StatsRepository(context); onContentChanged(); } @Override public GameStats loadInBackground() { return statsRepository.getStatsForGame(gameId); } @Override protected void onStartLoading() { if (takeContentChanged()) { forceLoad(); } } @Override protected void onStopLoading() { cancelLoad(); } }