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

前端 未结 30 2096
迷失自我
迷失自我 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:43

    you can use FragmentActivity.onStart before popBackStackImmediate

    like this:

    public void backStackFragment() {
        this.start();
        getFragmentManager().popBackStackImmediate();
    }
    
    public void start(){
        FragmentActivity a = getActivity();
        if(a instanceof DepositPlanPadActivity){
          ((DepositPlanPadActivity)a).onStart();
        }
        if(a instanceof SmallChangePlanPad){
                ((SmallChangePlanPad)a).onStart();
            }
            if(a instanceof UserCenterActivity){
                ((UserCenterActivity)a).onStart();
            }
        }
    

    http://jorryliu.blogspot.com/2014/09/illegalstateexception-can-not-perform.html

提交回复
热议问题