Horizontal list view in vertical scroll view in android

Pal Pandi picture Pal Pandi · Nov 9, 2013 · Viewed 8.6k times · Source

I need to implement application like https://play.google.com/store/apps/details?id=com.alphonso.pulse

what i tried is,

   I think they should done through horizontalscrollview/horizontallistview.
   So i integrate horizontal listview through this sample,

https://www.dev-smart.com/archives/34

what i need is,

  • I need to integrate horizontal listview inside the vertical listview

  • I should know how they integrate this idea

Any help should be appreciable.Thanks

Answer

Tobias picture Tobias · Nov 9, 2013

Do you need something like this?

<ScrollView>
  <LinearLayout android:orientation="vertical">

    <!-- First row -->
    <HorizontalScrollView>
      <LinearLayout android:orientation="horizontal">
        <!-- Items of this row -->
      </LinearLayout>
    </HorizontalScrollView>

  </LinearLayout>
</ScrollView>

You will need to set appropriate layout attributes and you might want to add titles to the rows. If you have a variable number of rows, you can create them programmatically.