如何在Android中通过XML解析在Gallery上设置图像?
我可以通过 XML 解析在 ListVew 上设置图像,但无法在 Gallery 上设置图像。请让我知道如何做到这一点,任何教程或示例的链接都会有所帮助。
I can set Image on ListVew through XML parse but I can't set image on Gallery. Please let me know how to do that and any links to tutorials or sample could would help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个问题没有具体的答案。你必须使用很多东西。您只需搜索图库视图和惰性适配器...
This question has not a specific answer. You have to use many things. You just search on Gallery view and Lazy adapter...
通过使用XML解析,解析所有图像url。获取所有图像网址后,您可以使用 ListView 中图像的延迟加载。在 LazyLoading 代码中,他们在布局中使用了 ListView,因此图像和相应的文本显示为列表项,您可以将该 ListView 更改为 Gallery,如下所示:
我认为这会给您带来所需的结果。
By using the XML parsing, parse all the image url's. After getting all the image url's you can load the images using Lazy load of images in ListView. On the LazyLoading code they have used a ListView in the layout so the images and the corresponding text are shown as list items, you can change that ListView to a Gallery something like this:
I think this will get you the desired result.