Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (utility.hasICS()) {
- // This listener added in ICS
- searchItem.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {
- @Override
- public boolean onMenuItemActionExpand(MenuItem menuItem) {
- // Nothing to do when the action item is expanded
- return true;
- }
- @Override
- public boolean onMenuItemActionCollapse(MenuItem menuItem) {
- // When the user collapses the SearchView the current search string is
- // cleared and the loader restarted.
- if (!TextUtils.isEmpty(mSearchTerm)) {
- // onSelectionCleared();
- }
- mSearchTerm = null;
- getSupportLoaderManager().restartLoader(QUERY_ID, null, LocationActivity.this);
- return true;
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement