简体   繁体   English

带有Gridview的Android选项卡滞后

[英]Android tab with gridview lags in switch

I have 3 tabs in one of my android guis and the second one contains one which downloads images from the internet! 我的一个android GUI中有3个标签,第二个包含一个从互联网下载图像的 The problem is that when I switch between the tabs and I pass through the gridview I see a non user-friendly lag. 问题是,当我在选项卡之间切换并通过gridview时,看到了非用户友好的滞后。 How can I avoid this? 如何避免这种情况? I want a smooth behavior. 我想要一个平稳的行为。 Is it good solution to pause the downloads in every tab switch and resume them after the change? 在每个选项卡开关中暂停下载并在更改后恢复下载是否是一个好的解决方案?

What are you using to download the images and put them into the GridView? 您正在使用什么来下载图像并将其放入GridView? I have implemented functionality similar to yours (with a gridView being the large portion of one of the tabs). 我已经实现了与您类似的功能(gridView是其中一个选项卡的很大一部分)。 You should use a rather efficient tool called the UniversalImageLoader . 您应该使用一个相当有效的工具UniversalImageLoader It will lazy load the GridView and should eliminate any semblance of a lag if you implement caching correctly. 如果正确实现了缓存,它将延迟加载GridView,并且应该消除任何滞后现象。

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

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