admin管理员组文章数量:1245966
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?
本文标签: javaanr input dispatching timed out with images gallery and picassoStack Overflow
版权声明:本文标题:java - anr input dispatching timed out with images gallery and picasso - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740215178a2242726.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论