Android:惰性图像加载器导致图库卡顿
我正在使用惰性图像加载器,它设置 ImageView 的位图。我可以拖动图库,并且它会平滑地拖动,直到我的图像加载为止。然后,当我拖动图库时,它会结结巴巴,就好像它试图在中间图像上重新居中,并且不让我拖动。我必须猛击一下才能让它移动而不是最近。还有其他人遇到这个问题吗?
I'm using a lazy image loader, that sets an ImageView's bitmap. I can drag the gallery, and it drags smoothly until my images load in. Then while I'm dragging the gallery stutters, as if it's trying to recenter on the middle image and doesn't let me drag. I have to do a fling to get it to move and not recenter. Anyone else run into this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,看来我在 UI 线程中做了太多事情,导致动画卡顿。现在我做得“更少”并且它已经解决了。
Ok, it seems I was doing too much in the UI thread, which was causing the animation to stutter. Now I'm doing "less" and it's fixed.
这是 Android 中的一个错误,已十个月未修复:http://code .google.com/p/android/issues/detail?id=16171
每当 Gallery 的子组件执行
layout()
时,就会发生这种情况。This is a bug in Android, unfixed for ten months: http://code.google.com/p/android/issues/detail?id=16171
It will occur whenever a child of the Gallery does a
layout()
.