解决方法:自定义的fragment最好有一个Public的参数为空的构造函数,若需要传入一个参数,可以使用下面的方法
public FileViewFragment(){    }
 public static FileViewFragment getInstance(A a){
        FileViewFragment fileViewFragment = new FileViewFragment();
        fileViewFragment.a = a;
        return fileViewFragment;
    }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-09-14
  • 2022-02-22
  • 2021-11-12
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-06-23
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案