-1

I'm still new to android, and i'm trying to create something like this dynamically: scrollview with imagebuttons

On this example i have it hardcoded in xml and i have no idea how to do it dynamically. Can you guys help with with a simple example?

IDontEvenKnow
  • 122
  • 1
  • 1
  • 9

2 Answers2

0

You need to display a list of items instead of using ScrollView. You have to use a RecyclerView with an adapter for data.

Check this training on Android Developers portal: http://developer.android.com/training/material/lists-cards.html

John Cordeiro
  • 2,161
  • 1
  • 14
  • 12
0

You should use CardView instead of scrollview. Deserialize your Json into object list and then create adapter for Cardview

Community
  • 1
  • 1
arsena
  • 1,935
  • 19
  • 36