Android Programming Tutorials

(Romina) #1
Searching For Food

That file, in turn, references a pair of String resources, so we need to add


them to LunchList/res/values/strings.xml:


<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">LunchList</string>
<string name="searchLabel">Restaurants</string>
<string name="searchHint">lorem</string>
</resources>

At this point, you can recompile and reinstall your application. Choosing


the option menu will display our new search item:


Figure 51. The new option menu

Choosing the search brings up the search field:


303
Free download pdf