提交 57765420 编写于 作者: G guoshuyu

update demo #2753

上级 9199659b
......@@ -80,7 +80,7 @@ public class RecyclerViewActivity extends AppCompatActivity {
//是否全屏
if(!GSYVideoManager.isFullState(RecyclerViewActivity.this)) {
GSYVideoManager.releaseAllVideos();
recyclerNormalAdapter.notifyDataSetChanged();
recyclerNormalAdapter.notifyItemChanged(position);
}
}
}
......
......@@ -116,7 +116,7 @@ public class RecyclerItemNormalHolder extends RecyclerItemBaseHolder {
}
});
gsyVideoPlayer.loadCoverImage(url, R.mipmap.xxx2);
gsyVideoPlayer.loadCoverImageBy(R.mipmap.xxx2, R.mipmap.xxx2);
}
/**
......
......@@ -31,6 +31,8 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
String mCoverOriginUrl;
int mCoverOriginId = 0;
int mDefaultRes;
public SampleCoverVideo(Context context, Boolean fullFlag) {
......@@ -75,11 +77,21 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
.into(mCoverImage);
}
public void loadCoverImageBy(int id, int res) {
mCoverOriginId = id;
mDefaultRes = res;
mCoverImage.setImageResource(id);
}
@Override
public GSYBaseVideoPlayer startWindowFullscreen(Context context, boolean actionBar, boolean statusBar) {
GSYBaseVideoPlayer gsyBaseVideoPlayer = super.startWindowFullscreen(context, actionBar, statusBar);
SampleCoverVideo sampleCoverVideo = (SampleCoverVideo) gsyBaseVideoPlayer;
sampleCoverVideo.loadCoverImage(mCoverOriginUrl, mDefaultRes);
if(mCoverOriginUrl != null) {
sampleCoverVideo.loadCoverImage(mCoverOriginUrl, mDefaultRes);
} else if(mCoverOriginId != 0) {
sampleCoverVideo.loadCoverImageBy(mCoverOriginId, mDefaultRes);
}
return gsyBaseVideoPlayer;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册