接口 Bundleable


  • public interface Bundleable
    实现了此接口的类可以通过 toBundle() 存储传递,并可以通过 Bundleable.Creator 还原
    
     Foo foo = ...;
     Bundle fooBundle = foo.toBundle();
     Foo restoredFoo = Foo.CREATOR.fromBundle(fooBundle);
     assertThat(restoredFoo).isEqualTo(foo);
     
     
    作者:
    Li Junchao
    • 方法详细资料

      • toBundle

        Bundle toBundle()
        把需要store的信息写入bundle
        返回:
        Bundle