Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Workaround for missing action view
Browse files Browse the repository at this point in the history
Refs #2037
  • Loading branch information
M66B committed Oct 20, 2014
1 parent b1eddc9 commit 3842b9d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ See for more information about XPrivacy 3 [this FAQ](https://github.com/M66B/XPr

**Next release**

* Workaround for missing action view ([issue](/../../issues/2037))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

**Version 3.4.4 TEST**
Expand Down
46 changes: 24 additions & 22 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,29 +485,31 @@ public boolean onCreateOptionsMenu(Menu menu) {

// Searchable
SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String newText) {
searchQuery = newText;
applyFilter();
return true;
}
if (searchView != null) {
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String newText) {
searchQuery = newText;
applyFilter();
return true;
}

@Override
public boolean onQueryTextSubmit(String query) {
searchQuery = query;
applyFilter();
return true;
}
});
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override
public boolean onClose() {
searchQuery = "";
applyFilter();
return true;
}
});
@Override
public boolean onQueryTextSubmit(String query) {
searchQuery = query;
applyFilter();
return true;
}
});
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override
public boolean onClose() {
searchQuery = "";
applyFilter();
return true;
}
});
}

return true;
} else
Expand Down

0 comments on commit 3842b9d

Please sign in to comment.