android bundle 使用注意

来源:互联网 发布:unity3d导出fbx插件 编辑:程序博客网 时间:2024/05/21 09:53
mySubscribeListParcelable=new ListParcelable(toSubscribeList);
Intent intent=new Intent(GroupBuyMySubscribeListActivity.this,GroupBuyToSubscribeListActivity.class);
Bundle bundle=new Bundle();
intent.putExtras(bundle);
bundle.putSerializable("mySubscribeListParcelable", mySubscribeListParcelable);
startActivity(intent);
这是第一个Activity




Bundle bundle = getIntent().getExtras(); 
        ListParcelable obj=(ListParcelable) bundle.getSerializable("mySubscribeListParcelable");
  
这是第二个











intent.putExtras(bundle);
bundle.putSerializable("mySubscribeListParcelable", mySubscribeListParcelable);顺序不对