Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问一下图片和视频轮播出现问题。 #328

Open
candebbs opened this issue Jan 11, 2024 · 0 comments
Open

请问一下图片和视频轮播出现问题。 #328

candebbs opened this issue Jan 11, 2024 · 0 comments

Comments

@candebbs
Copy link

我在做图片和视频一起轮播,假始第一第二个是图片,第三第四个是视频,当我一进入界面时,当轮播到第二张图片时,开始播放第三个的视频,当轮播到第三个时,两个视频一起播放,我是按照

    @Override
    protected void bindData(BaseViewHolder<BannerData> holder, BannerData data, int position, int pageSize) {
        if (getViewType(position) == BannerData.TYPE_NEW) {
            holder.setImageResource(R.id.image_view, data.getDrawable());
        } else {
            ImageView imageView = holder.findViewById(R.id.banner_image);
            Glide.with(imageView).load(data.getImagePath()).placeholder(R.drawable.placeholder).into(imageView);
        }
    }

来写的,
通过打印日志发现,当轮播到第二个图片,第三个视频的bindData执行了,是不是预加载的问题?请问有什么好的解决方法吗?

@candebbs candebbs changed the title 请问一下图片和轮播出现问题。 请问一下图片和视频轮播出现问题。 Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant