admin
2021-07-20 27bd1f81221b8c8e8047118a64c2beb7bc214bbb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.yeshi.video.ui;
 
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
 
import com.lcjian.library.RetainViewFragment;
import com.yeshi.base.entity.video.VideoInfo;
import com.yeshi.video.R;
 
/**
 * 小屏播放页-简介
 * @author weikou2015
 *
 */
public class VideoIntroductionFragment extends RetainViewFragment {
 
    public static VideoIntroductionFragment newInstance(VideoInfo videoInfo) {
        VideoIntroductionFragment videoIntroductionFragment = new VideoIntroductionFragment();
        Bundle args = new Bundle();
        args.putSerializable("video_info", videoInfo);
        videoIntroductionFragment.setArguments(args);
        return videoIntroductionFragment;
    }
    
    @Override
    public int getContentResource() {
        return R.layout.video_introduction_fragment;
    }
 
    @Override
    public void onCreateView(View contentView, Bundle savedInstanceState) {
        VideoInfo videoInfo = (VideoInfo) getArguments().getSerializable("video_info");
        TextView tv_introduction = (TextView) contentView.findViewById(R.id.tv_video_introduction);
        tv_introduction.setText(videoInfo.getIntroduction());
    }
}