views:

55

answers:

2

In .NET land I would normally query the database and populate a generic List kind of collection. Then the app would use this.

In Android land I have been reading about DB access and use in apps. Why do most of the docs show the use of a cursor and use of constants to access it? Is this to save on resources perhaps?

+1  A: 

You can use the cursor for your adapter. Android is driven by listadatpers such as SimpleCursorAdapter. Using constant is a pro for design technique.

Pentium10
+1  A: 

Is this to save on resources perhaps?

Exactly. + performance.
The general rule is to avoid creating objects w/o necessity as you are limited on memory, cpu power (and resulting battery life) and garbage collection is rather expensive.

alex