Android Cursor over Generic list of business objects?

前端 未结 2 567
攒了一身酷
攒了一身酷 2021-01-21 00:37

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 D

相关标签:
2条回答
  • 2021-01-21 00:46

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

    0 讨论(0)
  • 2021-01-21 01:09

    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.

    0 讨论(0)
提交回复
热议问题