Mohammed Magdy
Mohammed Magdy

Reputation: 114

How get all image in folder in my site to listview?

Hello everyone i using this Lazylist , i need this lazy read all image in one path.

example : i have this path http://www.example.com/image in this path There are many image

http://www.example.com/image/image1.jpg

http://www.example.com/image/sacimge.jpg

http://www.example.com/image/xxx.jpg

and so on ...

need Lazy read all image in this path and insert in My Listview why How do I do that ???

Upvotes: -1

Views: 362

Answers (1)

user2641570
user2641570

Reputation: 814

Unfortunately I don't think this is possible. There is no way for lazyList to know how many images you have and what are their url. I suggest you create webservice, like

http://www.example.com/image/cat

Returning a json or xml array containing all the urls of you images. On server side you can access your image directory and build this list dynamically.

Then in your app you can call this web service using (retrofit lib to make it easy for you). Then you can feed this url list into your LazyList.

Upvotes: 0

Related Questions