private void loadImage(String url, ViewPicWrapper wrapper, final boolean isOrigin) { LoadTask task = new LoadTask(url, wrapper, !mOriginLoaded && isOrigin); if (mOriginLoaded || isOrigin) { task.load(); } else { mLoadTasks.add(task); } }
public List<HistoryItem> load(@NotNull Lottery.Type type) throws DataSource.DataLoadingException { if (mHistoryCache.get(type) != null) { return mHistoryCache.get(type); } DataSource dataSource; if (type == Lottery.Type.DLT) { dataSource = new DLTSource(); } else if (type == Lottery.Type.SSQ) { dataSource = new SSQSource(); } else { return null; } final LoadTask task = new LoadTask(type, dataSource); return task.load(); }
private void loadData(int page) { LoadTask loadTask = new LoadTask(page); loadTask.execute(); }