@Override public void onDataChange(int code) { super.onDataChange(code); if (code == DataChangeEventCode.CHANGE_TYPE_VIDEO_DETAIL_CHANGE) { Bundle bundle = getFinishBundle(); if (bundle == null) { return; } Video video = (Video) bundle.getSerializable(BundleUtil.KEY_VIDEO); int positionId = bundle.getInt(BundleUtil.KEY_ADAPTER_POSITION); if (positionId == -1) { return; } VideoTopicItem videoTopicItem = null; if (video != null) { videoTopicItem = new VideoTopicItem(); videoTopicItem.type = VideoTopicItem.TYPE_VIDEO; videoTopicItem.video = video; } getFinishBundle().putSerializable(BundleUtil.KEY_VIDEO, videoTopicItem); } listGroup.onDataChange(code); }
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); essenseManager = new VideosEssenseManager(); essenseAdapter = new VideoTopicAdapter(getActivity()); }