10

I know it may be weird that I want to succeed.

Let me explain whole in details. Firstly, I want to use two ListView looking in an Activity screen. Just like how Pinterest looks like. (I'm not sure is it true but it's named as heterogeneous gridview.) There is also one thing that I needed to implement: lazy loading. There are about 30 images in my activity, so that's not good to fetch all images at one time. That's why I needed lazy load.

So in first, I pondered on that I how obtain that appearance, I mean heterogeneous gridview. Then decided to add to LinearLayout in a ScrollView. Linears have vertical orientation. With thay approach, I added my new views by using odd-even method in Linear Layouts.

Althought, there weren't any adapter so according to my knowledge, there is no way to controll which items would be displayed. So lazy load is not suitable.

I've also tried two ListView in an Activity, but got some lag and also synchronous scroll problems. On the other hand it has a bad recycling.

So in this scenario, I want to ask is there way to fill LinearLayouts using Adapter? Or what would you recommend to create a heterogeneous gridview but also with lazy load.

If my approaches are wrong, I would not hasitate to change it.

Any clue would be great for me. If there is something unclear, please specify it. I'll explain with more details.

Ogulcan Orhan
  • 5,170
  • 6
  • 33
  • 49
  • First link on google search : http://stackoverflow.com/questions/11736658/android-heterogeneous-gridview-like-pinterest – Antrromet Jan 21 '13 at 09:34
  • Thanks, checked all answers already, PinterestListView is suitable for lazy load but not has synchronous scroll, lag problem. StaggeredGridView and AntipodalWall is not suitable for lazy load, btw that libraries is not up-to-date. So I need my own library. – Ogulcan Orhan Jan 21 '13 at 09:39
  • For loading images lazily you can use [LazyList](https://github.com/thest1/LazyList) library. I haven't used the PinterestListView, but I think you can implement a asymmetric grids by following the logic in that library. – Supreethks Jan 23 '13 at 09:34
  • You may also want to check the answer to this question: http://stackoverflow.com/a/14457328/1186983 – Supreethks Jan 23 '13 at 09:35
  • Thank you for answers, I'll check and tell the result. – Ogulcan Orhan Jan 23 '13 at 10:10
  • 1
    @Supreethks, LazyList is fine in the terms of lazy loading but not enough efficent for heterogeneous gridview. That library is based on ListView&Adapter, so if I want to use it with heterogeneous gridview, there should be synchronous scrolling. That's already what I'm asking for. – Ogulcan Orhan Jan 24 '13 at 06:44

2 Answers2

5

After a lot of research, finally I found a library which have lazy loading and heterogeneous gridview and also not has any scroll or recycling lags/problems.

Maurycy's StaggeredGridView is completely what I'm looking for.

Here is the library and also there is a demo too.

Ogulcan Orhan
  • 5,170
  • 6
  • 33
  • 49
1

If I get your question right, here is what you need: http://spinlist.autsia.com/

Dmytro Titov
  • 2,802
  • 6
  • 38
  • 60
  • Dmytro, thanks. As I answered to Supreethks's comment, I needed lazy load with heterogeneous gridview. So that also would not fit on my problem. – Ogulcan Orhan Jan 24 '13 at 06:46