mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
ダイアログ挙動修正
This commit is contained in:
parent
3960c07482
commit
fc56781c20
|
@ -57,17 +57,23 @@ public class LacertaCreateTagDialog extends DialogFragment {
|
||||||
|
|
||||||
// TextEdit
|
// TextEdit
|
||||||
EditText tag_name_edit_text = view.findViewById(R.id.tag_name_edit_text);
|
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);
|
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
|
// 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_name = tag_name_edit_text.getText().toString();
|
||||||
String tag_color = tag_color_edit_text.getText().toString();
|
String tag_color = tag_color_edit_text.getText().toString();
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onPositiveClick(tag_name, tag_color);
|
listener.onPositiveClick(tag_name, tag_color);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(negativeButtonText, (dialog, which) -> {
|
builder.setNegativeButton(negativeButtonText == null ? "Cancel" : negativeButtonText, (dialog, which) -> {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
listener.onNegativeClick();
|
listener.onNegativeClick();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user