DialogFragment not seen as visible when created with onCreateDialog?

You can determine if a dialog fragment is showing by a function like: boolean isShowing(DialogFragment dlg) { return dlg.getDialog()! = null; }.

I have implemented a dialog with extends DialogFragment. I create the dialog using AlertDialog. Builder in onCreateDialog (onCreateView is not used).

This returns false. Now the following is the Fragment::isVisible code from the compatibility sources. The calls returns false because mView is null because the view isn't attached to a window.

Any ideas as to how I should be invoking the dialog, or creating it for that matter, so that it is attached to the fragment's root view? Or how else I should be checking for visibility? Thanks in advance, Peter.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions