From fc56781c205d0bd1f1ef4e5c137248a2a2cb9d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 26 Jan 2024 15:17:43 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E6=8C=99=E5=8B=95=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/common/LacertaCreateTagDialog.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaCreateTagDialog.java b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaCreateTagDialog.java index 06940715..6a187926 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaCreateTagDialog.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaCreateTagDialog.java @@ -57,17 +57,23 @@ public class LacertaCreateTagDialog extends DialogFragment { // TextEdit EditText tag_name_edit_text = view.findViewById(R.id.tag_name_edit_text); + com.google.android.material.textfield.TextInputLayout tag_name_text_input_layout = view.findViewById(R.id.tag_name_text_input_layout); + tag_name_text_input_layout.setHint("タグの名前"); EditText tag_color_edit_text = view.findViewById(R.id.tag_color_edit_text); + com.google.android.material.textfield.TextInputLayout tag_color_text_input_layout = view.findViewById(R.id.tag_color_text_input_layout); + tag_color_text_input_layout.setHint("タグの色(カラーコード)"); + + builder.setTitle(this.title == null ? "Create new tag" : this.title); // Button - builder.setPositiveButton(positiveButtonText, (dialog, which) -> { + builder.setPositiveButton(positiveButtonText == null ? "OK" : positiveButtonText, (dialog, which) -> { String tag_name = tag_name_edit_text.getText().toString(); String tag_color = tag_color_edit_text.getText().toString(); if (listener != null) { listener.onPositiveClick(tag_name, tag_color); } }); - builder.setNegativeButton(negativeButtonText, (dialog, which) -> { + builder.setNegativeButton(negativeButtonText == null ? "Cancel" : negativeButtonText, (dialog, which) -> { if (listener != null) { listener.onNegativeClick(); }