Last active
November 17, 2016 11:50
-
-
Save matdziu/6858b60f9b322c94e4d90feb27c010a8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| RxSearch.fromSearchView(searchView) | |
| .debounce(300, TimeUnit.MILLISECONDS) | |
| .filter(item -> item.length() > 1) | |
| .observeOn(AndroidSchedulers.mainThread()) | |
| .subscribe(query -> { | |
| adapter.setNamesList(namesAPI.searchForName(query)); | |
| adapter.notifyDataSetChanged(); | |
| apiCallsTextView.setText("API CALLS: " + apiCalls++); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment