overide FragmentActivity  onSaveInstanceState method like this.

 @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        if(outState != null) {
            String FRAGMENTS_TAG = "android:support:fragments";
            // remove掉保存的Fragment
            outState.remove(FRAGMENTS_TAG);
        }
    }

 

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-12-02
  • 2022-12-23
  • 2021-09-28
  • 2021-07-22
  • 2021-06-19
  • 2021-07-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-08-26
  • 2021-07-26
  • 2022-12-23
相关资源
相似解决方案