title: Android runtime generated tabs and content
body: <p>I am creating an application on Android which is essentially an interactive menu. I will have several categories for this menu, with a list of items in each. These items and item groups are specified when the application is loaded up, and are taken from an SQLite database (although I am not worrying about that bit yet).</p>
  
  <p>Below is my own design which is how I want to the application to look. The top orange bit is the actionbar, and I will use swipe/tabs attached to this. As mentioned all the item groups and items are read from a database, however there could be any number of items, or any number  of item groups, so I want both the tab bar and the bottom area of the screen to be scrollable.</p>
  
  <p><img src="https://i.stack.imgur.com/Bj7wu.png" alt="screenshot"></p>
  
  <p>The image is slightly cropped to hide some of the titles/logos etc.</p>
  
  <p>My idea so far is to create a ScrollView for each tab, and a TableRow fragment for the grey boxes containing the item_name, price etc. Would it be possible to create an undetermined number of views/pages at runtime, and then fill each of these with the scroll view and then in turn fill each scrollview with the rows of items. Each tab layout will be pretty much identical from the others apart from the actual items it contains. I could either generate all these tabs on creation, or dynamically read the contents of each tab and change the information when a tab is switched, would these be possible?</p>
  
  <p>I'm aiming for API 19, I created a "Tab Activity" but the code auto-generated is slightly different to tutorials I have seen on creating tab screens, they also always work with a pre-determined number of tabs.</p>
  
  <p>Having trouble with this as an Android newb, any help would be appreciated, thanks!</p>