On showing dialog i get “Can not perform this action after onSaveInstanceState”

前端 未结 17 1094
甜味超标
甜味超标 2020-11-29 18:37

Some users are reporting, if they use the quick action in the notification bar, they are getting a force close.

I show a quick action in the notification who calls t

17条回答
  •  不知归路
    2020-11-29 19:27

    please try to use FragmentTransaction instead of FragmentManager. I think the below code will solve your problem. If not, Please let me know.

    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    SnoozeDialog snoozeDialog = new SnoozeDialog();
    snoozeDialog.show(ft, "snooze_dialog");
    

    EDIT:

    Fragment Transaction

    Please check this link. I think it will solve you queries.

提交回复
热议问题