Created
April 30, 2014 03:57
-
-
Save porksteak/c24823fcc28c7177071c to your computer and use it in GitHub Desktop.
access SearchView hidden method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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