• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Android - Using Custom Views to Read Database Data - Slows Down Drastically!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing my first Android application and need some help with Custom Views.

Right now I have a database that lists two columns and about 300 entries or so (which will continue to grow). In my code I have a class that uses a LayoutInflator to help re-use an .xml layout. Then, it creates an instance of this class for each data entry, and displays it.

I have run a few tests and have come to the conclusion that the large delay is when I am creating the instance of the objects, not querying or displaying them.

Is there a better way to do this? My app is working well, but the delay every time you open it is really a pain.


Also, my rows appear all at once. I noticed on many other apps that once one loads, it will display that, then the next, etc. How is this done?

Thank you in advance for any help you can give me!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using a ListView, by any chance? If so, check out this topic, particularly Monu's 3rd post and my 3rd post.
 
Joe Masilotti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Are you using a ListView, by any chance? If so, check out this topic, particularly Monu's 3rd post and my 3rd post.



Well this is embarrassing... I had never even heard of ListViews before! I was pretty much trying to re-create it from scratch. Thank you so much for your post!!
reply
    Bookmark Topic Watch Topic
  • New Topic