最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - anr input dispatching timed out with images gallery and picasso - Stack Overflow

programmeradmin3浏览0评论

my app always give the anr input dispatching timed out

i know the reason but i don't know how to solve it the reason is i get a lot of urls for images from web service then i use picasso to load these urls into images views.

every imageview has a click event that move the app to another activity for more process.

the problem is when i use picasso it seemly picasso load the image in another thread then run on main thread to load the image into the imageview

once the responce from server come with urls i loop through these urls and load them in image views with picasso.

but some time some user could click on image before all images loaded and that will make the picasso some time return a response for an image in the old activity while i'm in the new activity which will result in in anr input dispatching timed out.

how i can solve this.

i don't want to wait for all images to load since it could be there a lot of images like 200 images and maybe more some times?

just a note i have the same problem with plugin called Why Not! Image Carousel! this plugin accept urls to load in imageviews and i loop through urls to load the images into the gallery but some times the user will be in another activity before the all images load which cause the same problem.

any ideas how to solve that?

发布评论

评论列表(0)

  1. 暂无评论