Android - dismissDialog does not dismiss the dialog

前端 未结 8 1663
悲哀的现实
悲哀的现实 2020-12-08 01:49

I am using the showDialog() and dismissDialog() to show progress dialogs in my app. Moved from creating the dialog and calling show()

8条回答
  •  无人及你
    2020-12-08 01:57

    After pressing the home button and navigating to app morelocal (change device language), when I came back to my app, new dialog boxes could not be closed via dismissDialog (I launched the dialog from activity onCreate).

    The solution was to call removeDialog instead of dissmissDialog(). This has been recommended by Harri above, many thx.

    I have created an Android bug report:

    13858


    Solution is to create your dialog using OnPostCreate instead of OnCreate. I added that info to the bug report and recommended to improve the dialog documentation.

提交回复
热议问题