简体   繁体   English

Glide 无法在 Android 上正确加载

[英]Glide is not loading properly on Android

I am doing Popular-Movies project stage ONE!我正在做流行电影项目的第一阶段! I have one problem by using Glide Library to load the picture from TheMovieDB API.我在使用 Glide 库从 TheMovieDB API 加载图片时遇到了一个问题。

I am using a recylerview adapter to display my data model in a Grid layout.我正在使用 recylerview 适配器在网格布局中显示我的数据模型。 Everything works very well except by loading some posters into the Gridlayout that some of them haven't been loaded properly.除了将一些海报加载到 Gridlayout 中,其中一些海报没有正确加载之外,一切都运行良好。 Please take a look at my screenshot and let me know if you come up with some idea.请看一下我的屏幕截图,如果您有任何想法,请告诉我。

在此处输入图片说明

by adding "fixedsize" and "cachesize" to my recyclerview that solve my problem, but I think I have go to find that how I can solve the problem for the dynamic environment.通过在我的回收视图中添加“fixedsize”和“cachesize”来解决我的问题,但我想我必须去寻找如何解决动态环境的问题。

    recyclerView.setHasFixedSize(true);
    recyclerView.setItemViewCacheSize(20);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM