I am developing an Android app and one of its use cases is to display the following situation.
- I have a list of links (L). Each of these links is the URL for a
picture in the Internet; - I have to download each picture of (L) and display it in a ListView. There should be two rows in the ListView(s), where I can insert the pictures. I want to do something similar to this app;
- I have to display the pictures in a HorizontalScrollView;
- The pictures have to be downloaded on demand, in other words, I just
download the picture using a Thread when the HorizontalScrollView is
in a position that shows this picture (similar to this
situation).
My questions:
- Is it possible to insert an ListView in a HorizontalScrollView? (If yes, how do I do it?)
-
How do I use HorizontalScrollView? I mean, is there any difference on how I use a ListView inside a ScrollView?
-
Do you know any plugin/project that has the same purposes?
Question 1 – Perhaps you should re-think your design to use a list of HorizonzalListView.
Question 2 – You can created a list of HorizontialListView programmatically, place them inside a LinearLayout wrapped by a vertical scroll view.
Your myhlist.xml layout:
You activity:
}