diff --git a/app/src/main/java/org/ntlab/amaryllis/client/fragment/ListFragment.java b/app/src/main/java/org/ntlab/amaryllis/client/fragment/ListFragment.java index efa454c..552fc74 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/fragment/ListFragment.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/fragment/ListFragment.java @@ -4,6 +4,7 @@ import android.os.Bundle; import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; @@ -71,7 +72,7 @@ } // 呼び出し元のFragment -public class MyFragment extends Fragment implements MyDialogFragment.MyDialog.OnOkClickListener { +class MyFragment extends Fragment implements MyDialogFragment.MyDialog.OnOkClickListener { // ダイアログを表示するボタン private Button mDispDialog; @@ -84,10 +85,10 @@ mSelectedText = (TextView) v.findViewById(R.id.textSelected); mDispDialog = (Button) v.findViewById(R.id.btnDispDialog); - mDispDialog.setOnClickListener(new DialogInterface.OnClickListener() { + mDispDialog.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { FragmentManager manager = getActivity().getSupportFragmentManager(); - MyDialog dialog = MyDialog.newInstance(); + MyDialogFragment.MyDialog dialog = MyDialogFragment.MyDialog.newInstance(); dialog.setTargetFragment(MyFragment.this, 0); // ★★★ dialog.show(manager, "MyDialog"); }