Reformatting

This commit is contained in:
José Padarian 2020-04-19 14:45:55 +10:00
parent 6b56e914b3
commit 4d94d6bced

View File

@ -282,10 +282,10 @@ public class ItemActivity extends AppCompatActivity {
if (hitTestResult.getType() == WebView.HitTestResult.IMAGE_TYPE ||
hitTestResult.getType() == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
MaterialDialog.Builder builder = new MaterialDialog.Builder(this);
builder.title(R.string.image_options);
builder.items(R.array.image_options);
builder.itemsCallback((dialog, itemView, position, text) -> {
new MaterialDialog.Builder(this)
.title(R.string.image_options)
.items(R.array.image_options)
.itemsCallback((dialog, itemView, position, text) -> {
switch (position) {
case 0:
shareImage(hitTestResult.getExtra());
@ -313,17 +313,17 @@ public class ItemActivity extends AppCompatActivity {
imageTitle = "";
}
}
MaterialDialog.Builder captionBuilder = new MaterialDialog.Builder(this);
captionBuilder.title(urlToDownload);
captionBuilder.content(imageTitle);
captionBuilder.show();
new MaterialDialog.Builder(this)
.title(urlToDownload)
.content(imageTitle)
.show();
break;
default:
throw new IllegalStateException("Unexpected value: " + position);
}
});
builder.show();
})
.show();
}
}