I am trying to display a basic dialog in Android using a DialogFragment using an argument for the dialog message as described in StackOverflow thread and DialogFragment document
you have to use getArguments
to retrieve the Bundle
you set with setArguments
Instead of
if(savedInstanceState != null) {
dialogMessage = savedInstanceState.getString(DIALOG_MESSAGE);
}
you should have something like:
Bundle bundle = getArguments();
if (bundle != null) {
dialogMessage = bundle.getString(DIALOG_MESSAGE);
}