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
.getString(R.string.opml_export_success_sum)
+ output.toString())
.setPositiveButton(R.string.share_label, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {Uri outputUri = Uri.fromFile(output);
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "OPML Export");
sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri);
sendIntent.setType("text/plain");
context.startActivity(Intent.createChooser(sendIntent, context.getResources().getText(R.string.share_label)));
}
.setPositiveButton(R.string.share_label, (dialog, which) -> {
Uri outputUri = Uri.fromFile(output);
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "OPML Export");
sendIntent.putExtra(Intent.EXTRA_STREAM, outputUri);
sendIntent.setType("text/plain");
context.startActivity(Intent.createChooser(sendIntent,
context.getResources().getText(R.string.share_label)));
});
}
alert.create().show();