Pinterest style listview or gridview in android

This question already has an answer here:

  • What is the best way to combine (merge) 2 JSONObjects?
  • How to close a project in Android Studio?
  • GridLayout spitting out “inconsistent constraint” debug-level logs
  • Error Running Android Project in Intellij IDEA
  • How to handle drag in an android chess app?
  • Is it possible to receive an SMS from Android emulator?
  • Related posts:

    Transfer existing Android app to another developer account?
    Libgdx - IllegalStateException at unkown location
    How can I convert the facebook post created_time to the time zone of the user?
    best OCR (Optical character recognition) example in android
    AsyncTaskLoader onLoadFinished with a pending task and config change
    ExpandableListView Slide animation on Group expand/collapse
  • Actionbar progress indicator and refresh button
  • Handlers and memory leaks in Android
  • Change tab background color and remove divider line between tabs
  • Cipher With ECB Mode Should Not Be Used
  • Android proguard Javascript Interface problem
  • Connect Eclipse to Android emulator on a different machine
  • 2 Solutions collect form web for “Pinterest style listview or gridview in android”

    I never thought about it until you brought it up, but this is an interesting problem to try an solve. My suggestion would be to fit 3 ListView‘s into the Activity or Fragment. I assume each one recycles their own View’s respectively. This solves your performance pretty easily assuming it is safe to do it. So maybe a horizontal LinearLayout that holds the 3 ListViews. Adding some padding to the middle one would produce the desired effect.

    Of course, more thought needs to be put into deciding how the images end up where they are, but that is you to figure out 🙂 Hope this gives you some ideas!

    I would do it this way:

      LinearLayout (horizontal)
        LinearLayout (vertical, layout weight for width)
          [All the content in column 1]
        LinearLayout (vertical, layout weight for width)
          [All the content in column 2]
        LinearLayout (vertical, layout weight for width)
          [All the content in column 3]

    Use lazy loading for the pictures if there are thousands

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.