I posted some code a while back for just this problem:
https://groups.google.com/forum/?fromgroups#!searchin/ormlite-android/OrmLiteSimpleCursorAdapter/ormlite-android/P0LNbOXd2bM/Vjgqk9aHKsIJ
There are also a few more topics which are relevant:
https://groups.google.com/forum/?fromgroups#!topic/ormlite-android/5sXxF3f9MYc[1-25]
https://groups.google.com/forum/?fromgroups#!topic/ormlite-user/SbRoHIov5pI[1-25]
This topic comes up every once in a while, but nothing is in ORMLite
itself. It's certainly doable... The code from my post (the first link)
is used in the MOTOACTV Android app and I haven't seen or heard of any
issues with it.
~Craig
BTW - This question probably best belongs under the Android group;
copying that list.
On 09.08.2012 14:24, Michael Burton wrote:
> I'm evaluating ORMs for a major Android app and one question I
> haven't
> been able to answer yet is best practices concerning ORMLite and
> Android ListViews.
>
> Most of the ORMLite examples I've found online load all of the DAO
> objects into an ArrayAdapter to iterate over. I'm sure this is fast,
> but it's simply not tenable for lists involving large numbers of
> objects considering a phone's limited heapsize.
>
> Android best practices generally use dynamically loading listview
> adapters that read their data from their source a row at a time
> rather
> than all at once. Are there examples of how to do this using ORMLite?
> Is this desirable using ORMLite, or does the performance overhead
> make
> the listview view inflation too sluggish?
>
> Cheers,
> Mike