Update Search recents behavior

- per UX request
- Search recents show now by defaults with the recent searches
when the SearchView is empty
- when we press on a Serach recent, we are showing the Search results
and the recents are disappearing
- when keying text in the SearchView, we hide the recents and start
showing the results
- we still save the Search query when hitting on a result

Change-Id: I6c2be21660a30f6973dea27d4852b2068a05963d
This commit is contained in:
Fabrice Di Meglio
2014-05-23 16:03:43 -07:00
parent 2416a3e071
commit 7e4855e8f6
2 changed files with 31 additions and 30 deletions

View File

@@ -1212,7 +1212,7 @@ public class SettingsActivity extends Activity
@Override
public boolean onQueryTextChange(String newText) {
mSearchQuery = newText;
if (TextUtils.isEmpty(newText) || mSearchResultsFragment == null) {
if (mSearchResultsFragment == null) {
return false;
}
return mSearchResultsFragment.onQueryTextChange(newText);