use lambda

This commit is contained in:
Tom Hennen 2015-09-07 20:43:53 -04:00
parent de879e1dd9
commit 00b1badb3f
1 changed files with 8 additions and 9 deletions

View File

@ -96,15 +96,14 @@ public class OpmlExportWorker extends AsyncTask<Void, Void, Void> {
alert.setMessage(context alert.setMessage(context
.getString(R.string.opml_export_success_sum) .getString(R.string.opml_export_success_sum)
+ output.toString()) + output.toString())
.setPositiveButton(R.string.share_label, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.share_label, (dialog, which) -> {
@Override Uri outputUri = Uri.fromFile(output);
public void onClick(DialogInterface dialog, int which) {Uri outputUri = Uri.fromFile(output);
Intent sendIntent = new Intent(Intent.ACTION_SEND); Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "OPML Export"); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "OPML Export");
sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri); sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri);
sendIntent.setType("text/plain"); sendIntent.setType("text/plain");
context.startActivity(Intent.createChooser(sendIntent, context.getResources().getText(R.string.share_label))); context.startActivity(Intent.createChooser(sendIntent,
} context.getResources().getText(R.string.share_label)));
}); });
} }
alert.create().show(); alert.create().show();