1.在model里面實(shí)現(xiàn)Serializable
重點(diǎn),model中嵌套了其它的實(shí)體類 也需要實(shí)現(xiàn)
implements Serializable
image.png
2.傳值
Intent intent = new Intent(mContext, PostDetailActivity.class);
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");