在Android的可扩展列表视图加载图片 [英] Loading Images in Android Expandable List View
问题描述
目前我已经实现可扩展列表视图从以下网站参考:
http://www.androidhive.info/2013/07/ Android的可扩展列表 - 视图 - 教程/
Currently I have implemented Expandable List View referencing from the following website: http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/
现在,我怎么从一个网址下载一个JPEG(E.Eħ - P://www.test.com/image.jpg),并选择该列表中的孩子时,显示每个列表子内这一形象?目前,它只能显示数据。
Now, how do I download a jpeg from a url(e.e. h--p://www.test.com/image.jpg) and display this image within each list child when that list child is chosen? Currently it only shows data.
究其原因,我暂时不想下载的资产文件夹内的图像和存储,这将增加应用程序的大小,这就是为什么使用的网址,只有当该列表中的孩子选择显示。
The reason is being, I don't want to download the images and store within the assets folder which will increase the size of the application, that's why use url to show only when that list child is chosen.
这可能吗?或者,我只能通过事先下载图像,并在资产存储这么做?
Is it possible? Or I could only do so by downloading the image beforehand and storing under assets?
在此先感谢
推荐答案
是的,它是可能的。如果要实现这个,那么你应该抓的延迟加载库。对于您可以使用 aquery
只是谷歌它,它的一个不错的库来提供所需的机制。
Yes it is possible. If you want to implement this then you should grab a lazy loading library. For that you may use aquery
just google it, its a nice library to provide the required mechanism.
另外扩展 istview
不过是列表视图
所以无论你想有一个列表视图
可以在 ExpandableListView
以及
Also Expandable istview
is nothing but a listview
so whatever you want to do inside a listview
can be done within ExpandableListView
as well.
这篇关于在Android的可扩展列表视图加载图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!