getting exception “IllegalStateException: Can not perform this action after onSaveInstanceState”

前端 未结 30 2057
迷失自我
迷失自我 2020-11-22 05:12

I have a Live Android application, and from market i have received following stack trace and i have no idea why its happening as its not happening in application code but it

30条回答
  •  情深已故
    2020-11-22 05:45

    This can also happen when calling dismiss() on a dialog fragment after the screen has been locked\blanked and the Activity + dialog's instance state has been saved. To get around this call:

    dismissAllowingStateLoss()
    

    Literally every single time I'm dismissing a dialog i don't care about it's state anymore anyway, so this is ok to do - you're not actually losing any state.

提交回复
热议问题