1

i have a one arraylist in this textview is fixed with country name but images is not fixed it is 10,50,100 but first country name is display than all images which is created dyanmic imageview so is this possible with listview and this country name and images morethan 1 how to do with this listview i have done this with tablelayout but i have no idea about tablelayout lazy loading all lazy loading is for listview not for tablelayout so i want to ask is this possible in listview like tablelayout so i can dothis thanks in advace

HERE YOU CAN SEE IMAGE SO U CAN BETTER UNDERSTAND enter image description here

Sunny
  • 97
  • 2
  • 9
  • this type of dynamic text name and more images is possible in listview yes than how – Sunny May 31 '12 at 11:29
  • I don't think this layout is possible in a ListView. Why not use a GridView instead? I have implemented a GridView in one of my apps using Fedor's Lazy Load method so I know _that_ is possible. – Siddharth Lele May 31 '12 at 11:43
  • it is possible in one gridview because this all data i get using xml parsing in one single list and u can see first country name is display than related images display images is not fix and first country name and images is set from latitude and longitude by using geocoder so is this possible in gridview if yes than can i implement this in one gridview or can i take morethan one gridview for this type of layout – Sunny May 31 '12 at 11:49
  • in simple i have more than one country and related images with lazy loading so i confused with this if only images display than is possible with gridview without country name and single country iamges – Sunny May 31 '12 at 11:53
  • Now i made sense of what you said. GridView isn't the option for you. The labels are not consistent. You will need a Table Layout for this. But I don't see why implementing the Lazy Load should be difficult. I already am using that in a ListView, GridView and a Gallery. The concept is essentially the same. Just the display is different. – Siddharth Lele May 31 '12 at 12:01
  • if you have any tutorial related to Dynamic table layout for this type than if possible than plzz send me link because i find every where but with dynamic table layout lazy loading tutorial not got so plzz if u done this before or u know about this than tell me or send me the related link for this type implementation thanks for give me this info – Sunny May 31 '12 at 12:07
  • I doubt you will find a solution tailtored specific to your needs. The trick is to find a tutorial closest to your needs and customize to your specifications. To get you started, would you like to see how I implement a grid view of Facebook Friends as an answer? You could pick the logic from there and modify it to your liking. – Siddharth Lele May 31 '12 at 12:11
  • Adding the entire code as answer. Please note that, instead of pasting the whole thing here, I will include links to pastebin instead. It is really really lengthy. – Siddharth Lele May 31 '12 at 12:22
  • ok just send me the link thanks for this help – Sunny May 31 '12 at 12:23

1 Answers1

1

As per the comments above:

  1. The link to the GridView Layout: http://pastebin.com/DXfut3eM
  2. The link to the custom GridView items: http://pastebin.com/57fC9uuk
  3. The link to the Main Activity: http://pastebin.com/bft4uuRT
  4. The link to the Adapter used as per Fedor's Lazy Load example: http://pastebin.com/dkP0NWju

Please note that I am not including links to the other files which are common to Fedor's example. They are pretty much the same with minor changes to suit my requirements. Use the stock files from his github and this will work exactly the same as mine.

Hope this helps and good luck.

Siddharth Lele
  • 27,623
  • 15
  • 98
  • 151