Clean up AlertDialogs
This commit is contained in:
parent
e33bb676f9
commit
c1f0a945c0
15 changed files with 89 additions and 112 deletions
|
|
@ -325,11 +325,11 @@ public final class NavigationHelper {
|
|||
if (context instanceof Activity) {
|
||||
new AlertDialog.Builder(context)
|
||||
.setMessage(R.string.no_player_found)
|
||||
.setPositiveButton(R.string.install,
|
||||
(dialog, which) -> ShareUtils.installApp(context,
|
||||
.setPositiveButton(R.string.install, (dialog, which) ->
|
||||
ShareUtils.installApp(context,
|
||||
context.getString(R.string.vlc_package)))
|
||||
.setNegativeButton(R.string.cancel, (dialog, which)
|
||||
-> Log.i("NavigationHelper", "You unlocked a secret unicorn."))
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) ->
|
||||
Log.i("NavigationHelper", "You unlocked a secret unicorn."))
|
||||
.show();
|
||||
} else {
|
||||
Toast.makeText(context, R.string.no_player_found_toast, Toast.LENGTH_LONG).show();
|
||||
|
|
|
|||
|
|
@ -61,11 +61,12 @@ public final class KoreUtils {
|
|||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
if (!tryOpenIntentInApp(context, intent)) {
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setMessage(R.string.kore_not_found)
|
||||
.setPositiveButton(R.string.install, (dialog, which) -> installKore(context))
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) -> { });
|
||||
builder.create().show();
|
||||
new AlertDialog.Builder(context)
|
||||
.setMessage(R.string.kore_not_found)
|
||||
.setPositiveButton(R.string.install, (dialog, which) ->
|
||||
installKore(context))
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public final class InternalUrlsHandler {
|
|||
.setTitle(R.string.player_stream_failure)
|
||||
.setMessage(
|
||||
ErrorPanelHelper.Companion.getExceptionDescription(throwable))
|
||||
.setPositiveButton(R.string.ok, (v, b) -> { })
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
}));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue