Skip to content

Instantly share code, notes, and snippets.

@porksteak
Created April 30, 2014 03:57
Show Gist options
  • Save porksteak/c24823fcc28c7177071c to your computer and use it in GitHub Desktop.
Save porksteak/c24823fcc28c7177071c to your computer and use it in GitHub Desktop.
access SearchView hidden method
try {
Bundle appData = new Bundle();
appData.putLong("data", data);
// use reflection to call hidden method
Method setAppSearchData = searchView.getClass().getMethod("setAppSearchData", Bundle.class);
setAppSearchData.invoke(searchView, appData);
}
catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment