Using TListView to show and search local data
In many cases with mobile apps, data is read from remote servers and then stored locally to make them available even without an internet connection. In this recipe, you'll see how to read and write to a file as well as how to show and search that data in a TListView
.
Getting ready
This recipe is short and simple, but it is really useful because the concepts exposed are reusable and allow you to gain confidence with some very important best practices. The final aspect of the app is shown in the following screenshot. Note that the Delete
button is only visible when an item is selected:

Figure 8.3: The Simple TODO app; when an item is selected, the Delete button is visible
How to do it...
- Create a new mobile app by navigating to
File
|New
|Other...
|Delphi Projects
|Multi-Device Application
. - Choose the
Header/Footer
template and click onOK
. - As soon as Delphi creates the project template, save all the files with the following names:
- Save the project...