diff --git a/app/src/main/java/org/ntlab/amaryllis/client/MyDialogFragment.java b/app/src/main/java/org/ntlab/amaryllis/client/MyDialogFragment.java index e37ab11..1af21e5 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/MyDialogFragment.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/MyDialogFragment.java @@ -27,6 +27,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.EditText; +import android.widget.LinearLayout; import android.widget.RadioGroup; import android.widget.TextView; @@ -90,14 +91,24 @@ public Dialog onCreateDialog(@Nullable Bundle savedInstanceState){ final EditText editTextTitle = new EditText(getActivity()); final EditText editTextOverview = new EditText(getActivity()); + + Context context = getContext(); + LinearLayout layout = new LinearLayout(context); + layout.setOrientation(LinearLayout.VERTICAL); editTextTitle.setHint("タイトル"); editTextOverview.setHint("概要"); + + layout.addView(editTextTitle); + layout.addView(editTextOverview); + + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity()) //Dialog dialog = new AlertDialog.Builder(getActivity()) .setTitle("ボイスメモ") .setMessage("タイトル、概要を入力してください。") - .setView(editTextTitle) - .setView(editTextOverview) + .setView(layout) + //.setView(editTextTitle) + //.setView(editTextOverview) .setPositiveButton("決定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) {