From 580e79b03afb224966a2941f47f08dec70f40d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 22 Jan 2024 12:07:52 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"InputDialog=E3=81=AEWrapper=E4=BD=9C?= =?UTF-8?q?=E6=88=90=20WIP"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 301fab802417ea81bff966efa1eb143f848af9c7. --- .../nem/lacerta/utils/TextInputDialog.java | 28 ------------------- 1 file changed, 28 deletions(-) delete mode 100644 utils/src/main/java/one/nem/lacerta/utils/TextInputDialog.java diff --git a/utils/src/main/java/one/nem/lacerta/utils/TextInputDialog.java b/utils/src/main/java/one/nem/lacerta/utils/TextInputDialog.java deleted file mode 100644 index 6f845589..00000000 --- a/utils/src/main/java/one/nem/lacerta/utils/TextInputDialog.java +++ /dev/null @@ -1,28 +0,0 @@ -package one.nem.lacerta.utils; - -import android.app.AlertDialog; -import android.content.Context; -import android.content.DialogInterface; - -import java.util.concurrent.CompletableFuture; - -public class TextInputDialog { - public static CompletableFuture show(Context context, String title, String message, String defaultValue, String positiveButton, String negativeButton) { - return CompletableFuture.supplyAsync(() -> { - AlertDialog.Builder builder = new AlertDialog.Builder(context); - builder.setTitle(title); - builder.setMessage(message); - final android.widget.EditText input = new android.widget.EditText(context); - input.setText(defaultValue); - builder.setView(input); - builder.setPositiveButton(positiveButton, (dialog, which) -> { - dialog.dismiss(); - }); - builder.setNegativeButton(negativeButton, (dialog, which) -> { - dialog.cancel(); - }); - builder.show(); - return input.getText().toString(); - }); - } -}