Forums Register Login

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

+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
Are you using a ListView, by any chance? If so, check out this topic, particularly Monu's 3rd post and my 3rd post.
+Pie Number of slices to send: Send
 

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!!
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 961 times.
Similar Threads
Is there an easy way to make UIs?
URGENT : how to connect the database to the GUI
NX: Can I justify my implementation at the database access level
Rescheduling a Timer Task
Rescheduling a Timer Task
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:51:02.