diff --git a/app/src/main/java/com/example/nemophila/MapsDialogFragment.java b/app/src/main/java/com/example/nemophila/MapsDialogFragment.java new file mode 100644 index 0000000..2e68a31 --- /dev/null +++ b/app/src/main/java/com/example/nemophila/MapsDialogFragment.java @@ -0,0 +1,29 @@ +package com.example.nemophila; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + +public class MapsDialogFragment extends DialogFragment { + + @NonNull + @Override + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + + builder.setTitle("投稿したいお店はこの中にありますか?") + .setMessage("ここにメッセージを入力します") + .setPositiveButton("OK", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + // このボタンを押した時の処理を書きます。 + } + }) + .setNegativeButton("キャンセル", null); + return builder.create(); + } +}