美文网首页
Intent传Model

Intent传Model

作者: 我叫杨毅 | 来源:发表于2018-10-29 09:43 被阅读2次

1.在model里面实现Serializable


implements Serializable

image.png

2.传值


Bundle bundle =new Bundle();

bundle.putSerializable("modelList", modelList.get(position));

intent.putExtras(bundle);

intent.putExtra("topicType", "1");

mContext.startActivity(intent);

3.获取


model= (TopicDetailsListModel) getIntent().getSerializableExtra("modelList");

相关文章

网友评论

      本文标题:Intent传Model

      本文链接:https://www.haomeiwen.com/subject/osgvtqtx.html