Android 中的动态图库内容
在我的画廊中,我想展示很多照片,一次一张,但所有照片放在一起的尺寸太大,无法放入内存。因此,当用户在图库中移动时,我必须加载/卸载图片。图库中的每个视图都包含一个RelativeLayout,其中包含图片和描述文本。有没有一种方法可以重写,每次图库视图更改时都会调用该方法?
相应适配器的getView不合适,有时不会被调用。
In my gallery i want to show lots of pictures, one at a time, but the size of all the pictures taken together, is too large to fit into memory. So I will have to load/unload pictures as the user moves through the gallery. Each view in the gallery consists of a RelativeLayout, containing the picture and a describing text. Is there a method I could override that gets called each time the gallery view changes?
getView of the corresponding adapter is not suitable, it sometimes does not get called.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
onItemSelected()
怎么样?How about
onItemSelected()
?