效果图
实现视频的播放和停止播放/*** 停止播放*/private void releaseVideo(View itemView) {final VideoView videoView = itemView.findViewById(R.id.video_view);final ImageView imgThumb = itemView.findViewById(R.id.img_thumb);final ImageView imgPlay = itemView.findViewById(R.id.img_play);videoView.stopPlayback();imgThumb.animate().alpha(1).start();imgPlay.animate().alpha(0f).start();}/*** 开始播放*/@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)private void playVideo(View itemView) {final VideoView videoView = itemView.findViewById(R.id.video_view);final ImageView imgPlay = itemView.findViewById(R.id.img_play);final ImageView imgThumb = itemView.findViewById(R.id.img_thumb);final RelativeLayout rootView = itemView.findViewById(R.id.root_view);final MediaPlayer[] mediaPlayer = new MediaPlayer[1];v