use of org.moire.ultrasonic.view.ShareAdapter in project ultrasonic by ultrasonic.
the class ShareActivity method load.
private void load() {
BackgroundTask<List<Share>> task = new TabActivityBackgroundTask<List<Share>>(this, true) {
@Override
protected List<Share> doInBackground() throws Throwable {
MusicService musicService = MusicServiceFactory.getMusicService(ShareActivity.this);
boolean refresh = getIntent().getBooleanExtra(Constants.INTENT_EXTRA_NAME_REFRESH, false);
return musicService.getShares(refresh, ShareActivity.this, this);
}
@Override
protected void done(List<Share> result) {
sharesListView.setAdapter(shareAdapter = new ShareAdapter(ShareActivity.this, result));
emptyTextView.setVisibility(result.isEmpty() ? View.VISIBLE : View.GONE);
}
};
task.execute();
}
Aggregations