I\'m trying to create a DialogFragment using a custom view in an AlertDialog. This view must be inflated from xml. In my DialogFragment
I haven't inflated from XML but I have done dynamic view generation in a DialogFragment successfully:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
m_editText = new EditText(getActivity());
return new AlertDialog.Builder(getActivity())
.setView(m_editText)
.setPositiveButton(android.R.string.ok,null)
.setNegativeButton(android.R.string.cancel, null);
.create();
}