When I try to execute the DialogoFragment
in a Fragment
, it tells me to create the Show method and I already tried with: this, getContext (), getFragmenteManager ()
, getActivity (). GetFragmenteManager ().
In the Activity
it does not give me problems to execute it only in the Fragment.
I am running this code from a Fragment:
public void onActivityCreated(Bundle savedInstanceState) {
btnComentario = (Button) getView().findViewById(R.id.btnComentario);
btnComentario.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
super.onActivityCreated(savedInstanceState);
(new MyDialogFragment()).show(getActivity().getFragmentManager(), "DialogFrament");
}
});
}
Thanks for the help