the specified child already has a parent

后端 未结 4 1731
梦如初夏
梦如初夏 2020-12-20 18:17

I created the AlertDialog using the builder. It shows when we call the show() method. I have the cancel button in that dialog. I can cance

4条回答
  •  别那么骄傲
    2020-12-20 18:31

    remove the previous dialog before adding new one. If you continue adding new dialog each time this will stay in your memory and your app will consume more battery.

    call remove view or removeAllViews() on layout in which you are adding your dialog.

提交回复
热议问题