I am developing a mobile device for Android and iOS. I need to populate data to my TListView with search functionality. I am using a local database for this development with SQLite3 having 100,000 records in one table alone.
Now, everything was so smooth, and this approach really serves the purpose I want. EXCEPT, only when I ran it in my Android mobile device, the loading of data to listview takes so much time (4.3 seconds) and this is not good.
Here are my attempts made so far but no avail:
I tried to limit my TFDQuery to top 20, but it is not implementing to the search function of listview. I am still trying a way where I could trigger the query right after or during the typing of an item in the search box of listview.
I used the property of query RecMax = 20. But then again, it failed! Perhaps, the search function works after the data is loaded to the listview.
Here are some of the approach I haven't tried yet:
- Manually code the loading of data to my listview. I don't want to do this because it looks to me like re-inventing the wheel. Though, this could be my last option, in case.
I believed somewhere somebody has got an answer with this. This is a very basic feature of the mobile device that you can find every day like Alibaba, Amazon, and eBay.
I want the search function of my listview to load only the top 20 searches from my database. Is there any simpler way to do this?