| | |
| | | if (rv_episode.getLayoutManager() == null) |
| | | rv_episode.setLayoutManager(ms); |
| | | |
| | | |
| | | rv_episode.addItemDecoration(new SpacesItemDecoration(DimenUtils.dip2px(getContext(), 10))); |
| | | if (rv_episode.getItemDecorationCount() == 0) |
| | | rv_episode.addItemDecoration(new SpacesItemDecoration(DimenUtils.dip2px(getContext(), 10))); |
| | | } |
| | | |
| | | |
| | |
| | | public void onCreateView(View contentView, Bundle savedInstanceState) { |
| | | Log.i(TAG, "onCreateView"); |
| | | EventBus.getDefault().register(this); |
| | | mVideoInfo = (VideoInfo) getArguments() |
| | | Bundle bundle = getArguments(); |
| | | mVideoInfo = (VideoInfo) bundle |
| | | .getSerializable("video_info"); |
| | | mPlayingPosition = getArguments().getInt("playing_position"); |
| | | mStart = getArguments().getInt("start"); |
| | | mEnd = getArguments().getInt("end"); |
| | | mPlayingPosition = bundle.getInt("playing_position"); |
| | | mStart = bundle.getInt("start"); |
| | | mEnd = bundle.getInt("end"); |
| | | |
| | | if (getArguments() != null) |
| | | getArguments().clear(); |
| | | if (bundle != null) |
| | | bundle.clear(); |
| | | |
| | | //防止没有内容崩溃 |
| | | if (mVideoInfo == null) |
| | | return; |
| | | |
| | | tv_video_resource = contentView.findViewById(R.id.tv_video_resource); |
| | | ll_add_attention = contentView.findViewById(R.id.ll_add_attention); |