4.7. Wrap-Up

In this chapter, you created the Twitter Searches app. First you designed the GUI. We introduced the ListView component for displaying a scrollable list of items and used it to display the arbitrarily large list of saved searches. Each search was associated with an item in the ListView that the user could touch to pass the search to the device’s web browser. You also learned how to create String resources for use in your Java code.

We stored the search tag–query pairs in a SharedPreferences file associated with the app and showed how to programmatically hide the soft keyboard. We also used a SharedPreferences.Editor object to store values in, modify values in and remove values from a SharedPreferences file. In response to the user ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.