There is a problem with SimpleFormDialog if it was in foreground when device going to sleep. When it wake up application crashes because of getDialog() is null in the following code:
@Override
protected void onDialogShown() {
// resize dialog when keyboard is shown to prevent fields from hiding behind the keyboard
if (getDialog().getWindow() != null) {
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
setPositiveButtonEnabled(posButtonEnabled());
requestFocus(0);
}
If I add null check to it - if (getDialog() != null && getDialog().getWindow() != null) - the crash disappears.
There is a problem with
SimpleFormDialog
if it was in foreground when device going to sleep. When it wake up application crashes because ofgetDialog()
is null in the following code:If I add
null
check to it -if (getDialog() != null && getDialog().getWindow() != null)
- the crash disappears.