首页 > 解决方案 > 缩略图加载时间过长

问题描述

我正在尝试使用 Glide 加载缩略图,但耗时太长。前几个缩略图会立即加载,但您必须等待很长时间才能加载其余的缩略图。

Glide.with(Context)
     .load(new File(videoFiles.get(position).getPath()))
     .placeholder(android.R.drawable.alert_dark_frame)
     .error(android.R.drawable.stat_notify_error)
     .into(holder.thumbnail);

我也尝试过毕加索,但结果并没有太大的不同。

Picasso.get()
                .load(new File(videoFiles.get(position).getPath()))
                .placeholder(alert_dark_frame)
                .error(stat_notify_error)
                .into(holder.thumbnail);

我应该更改什么实现以按预期更快地加载它们?

标签: android-studiothumbnailspicassoandroid-glide

解决方案


推荐阅读