0

I have to display multiple custom view with scrollable behaviour (as a grid list). Like scrolling horizontally and vertically on a chest grid where each item is a custom view.

What is the best way to do this on android ?

ps: I have seen we can use ScrollView -> TableLayout -> row -> list of custom view

sources:

Thanks ;)

Community
  • 1
  • 1
Adrien G
  • 228
  • 1
  • 4
  • 12

1 Answers1

1

I would look at this example. http://developer.android.com/training/implementing-navigation/lateral.html Look at the section labeled "Implement Horizontal Paging (Swipe Views)" A view pager will allow you to swipe to the right and left, while having a custom view that can scroll up and down.

Even if this exact example doesn't work for you, you could probably look at the source code for view pager. All its doing is caching x number of custom views and listening for touch events to show the next view.

Kent Andersen
  • 2,151
  • 3
  • 21
  • 29