Challenges
Your challenges in this chapter are not too difficult. The first one is to use the Activity.startSearch(…) method.
Under the hood, onSearchRequested() calls through to Activity.startSearch(…), a more detailed way of starting the search dialog. With startSearch(…), you can specify the initial query shown in the EditText where the user enters a search, add a bonus Bundle of data to send to the recipient searchable activity in the intent extras, or request a global web search dialog like you would see if you pressed the search button on the home screen.
For your first small challenge, use Activity.startSearch(…) to fill in the search dialog with the current search query and highlight it.
The second challenge is to display the total ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access