I want to show my dialogFragment without a title.
I start my dialog like this:
MyDialogFragment dialog = new MyDialogFragment();
dialog.show(getFragmentManager(), "dialog");
This works fine, but I have a title in my dialog.
For removing the title I tried to do this in my OnCreateView:
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
and this in my onCreate:
Dialog dialog = super.onCreateDialog(savedInstanceState);
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
and this also in onCreateView and onCreate:
setStyle(DialogFragment.STYLE_NO_TITLE, 0);
But every time my window is a small, white dialog. My View is not visible, I think, it's because my dialog is too small. I found some helps, where I can set my Dialogs size, but I don't want to set a fix size. My dialog should has the size, which is really necessary to show my full view.
How can I set my dialogs size as necessary?
Or is there a solution with a alertDialog, where I can set my customView or something like this?
Thanks a lot for help! :)