タイトルなどのGetter/Setter実装

This commit is contained in:
ろむねこ 2024-01-26 15:00:53 +09:00
parent 9bff04ce2e
commit c4bd3d761e
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -11,6 +11,36 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
public class LacertaCreateTagDialog extends DialogFragment { public class LacertaCreateTagDialog extends DialogFragment {
private String title;
private String message;
private String positiveButtonText;
private String negativeButtonText;
public LacertaCreateTagDialog setTitle(String title) {
this.title = title;
return this;
}
public LacertaCreateTagDialog setMessage(String message) {
this.message = message;
return this;
}
public LacertaCreateTagDialog setPositiveButtonText(String positiveButtonText) {
this.positiveButtonText = positiveButtonText;
return this;
}
public LacertaCreateTagDialog setNegativeButtonText(String negativeButtonText) {
this.negativeButtonText = negativeButtonText;
return this;
}
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity()); MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity());