use of com.frostwire.android.gui.dialogs.ConfirmSoundcloudDownloadDialog in project frostwire by frostwire.
the class DownloadSoundcloudFromUrlTask method createConfirmListDialog.
private ConfirmSoundcloudDownloadDialog createConfirmListDialog(Context ctx, List<SoundcloudSearchResult> results) {
String title = ctx.getString(R.string.confirm_download);
String whatToDownload = ctx.getString((results.size() > 1) ? R.string.playlist : R.string.track);
String totalSize = UIUtils.getBytesInHuman(getTotalSize(results));
String text = ctx.getString(R.string.are_you_sure_you_want_to_download_the_following, whatToDownload, totalSize);
// AbstractConfirmListDialog
ConfirmSoundcloudDownloadDialog dlg = ConfirmSoundcloudDownloadDialog.newInstance(ctx, title, text, results);
return dlg;
}
use of com.frostwire.android.gui.dialogs.ConfirmSoundcloudDownloadDialog in project frostwire by frostwire.
the class DownloadSoundcloudFromUrlTask method onPostExecute.
@Override
protected void onPostExecute(Context ctx, List<SoundcloudSearchResult> results) {
if (ctx != null && !results.isEmpty()) {
MainActivity activity = (MainActivity) ctx;
ConfirmSoundcloudDownloadDialog dlg = createConfirmListDialog(ctx, results);
dlg.show(activity.getFragmentManager());
}
}
Aggregations