Wednesday, March 5, 2014
android listview how to display the data in sqlite
I put some data exist sqlite, the application of direct access to the data in my sqlite, but I have a database of more data, estimated the 1W bar, take out all at once on the listview is not very good, right? Everyone encountered local data and relatively long time is how you handle it, how to make the display more smoothly?
Thank you<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
This case comes to mind is open threads
Reply:
Asynchronous loading colleagues under control the amount of data to select the appropriate time to release and load
Reply:
Loads more features like
Reply:
Is also like to load the data on the network, as each load only one page of it?
Reply:
1 When you query data from a database query in time may result in the application blocking, it is recommended that you use CursorLoader. You should get the data in this page I will not say good control sql statement can do
Reply:
Is (with the query limit) paging and AsyncTask (android comes with asynchronous task class) will be able to solve the problem you say
Reply:
But I feel that if you want the page to load, then up, then even if the page is reloaded before the data has been loaded, so how to avoid?
Reply:
Already loaded data will then reload it?
Reply:
Is paged, the clear front, front loading how many, keeping up to 50, when the pre-loaded sliding and cleared the cache optimization
Reply:
Previous data on the use of soft references, this is not easy OOM
Reply:
Implement paging function, when the SQL query can be set limit offset, maxResult. offset refers to the starting position in the result set, maxResult refers to the maximum number of a query.
Recommendations can see Chuan Chi podcast android video, listview chapters related to implementation.
Reply:
Ah this is a good idea, really need this knowledge
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment