0

I'm building an app that has a grid layout with programmatically generated items inside the grids, each of those items has some info like "name", "row", "column", "gridLayoutName", "someothervalues", "description of the item".

I will have hundreds of those items so I would like to store those information in an xml or external file. The code should access and load all of them, and show them inside the gridLayout, only some data will be accessed in the creation of the grid, like name, row and column, the rest will be accessed when the item will be clicked

How can i store all this data in my app, and how can i access each info like name, row, column etc. programmatically to build the grid?

DoubleP90
  • 1,249
  • 1
  • 16
  • 29
  • You should use a SQLite database. Check out this [answer][1] for more info. [1]: http://stackoverflow.com/questions/2729438/how-do-i-create-a-database-in-android – Alessandro Roaro Dec 14 '13 at 11:56
  • The resource you've provided me is for creating a database inside of android, instead i need to create a databse on my pc, and access it from android – DoubleP90 Dec 14 '13 at 12:04
  • @DoubleP90 *How can i store all this data in my app, and how can i access each info like name, row, column etc. programmatically to build the grid?* i think that your question is a chinese box, can you divide the problem in little part? – JJ86 Dec 14 '13 at 12:08

1 Answers1

0

For shiping an application with a Database see at Using your own SQLite database in Android applications

Also keep in mind that in some android devices there is a file-size limit so you may also need to split the database and then merge it in first application startup!

Post about the limit: accessing .sqlite database (>1Mb size) in android

Community
  • 1
  • 1
madlymad
  • 6,367
  • 6
  • 37
  • 68