We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observable<Boolean> mSearchFocusObs = RxView .focusChanges(mViewBuilder.getSearchView()) .share(); DisposableObserver<Boolean> mSearchStateDisposable = mSearchFocusObs .observeOn(AndroidSchedulers.mainThread()) .subscribeWith(getSearchFocusObserver()); private DisposableObserver<Boolean> getSearchFocusObserver() { return new DisposableObserver<Boolean>() { @Override public void onNext(Boolean isFocused) { Log.d("Test", "getSearchFocusObserver", "Focus? " + isFocused); } @Override public void onError(Throwable e) { Log.e("Test", "getSearchFocusObserver", "Error doing search"); } @Override public void onComplete() { Log.d("Test", "getSearchFocusObserver", "Focus!!!"); } }; }
This is being called only once, when the Activity is opened:
D/TestApplication: TestActivity getSearchFocusObserver Focus? false
After it's never called.
For what I digged, it's due to SearchView not reacting correctly to mySearchView.setOnFocusChangeListener()
mySearchView.setOnFocusChangeListener()
but only to
mySearchView.setOnQueryTextFocusChangeListener()
So my suggestion would be to either validate the type of View and then use the different method.. or have RxSearchView binding with focus option.
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
No branches or pull requests
This is being called only once, when the Activity is opened:
D/TestApplication: TestActivity getSearchFocusObserver Focus? false
After it's never called.
For what I digged, it's due to SearchView not reacting correctly to
mySearchView.setOnFocusChangeListener()
but only to
mySearchView.setOnQueryTextFocusChangeListener()
So my suggestion would be to either validate the type of View and then use the different method.. or have RxSearchView binding with focus option.
The text was updated successfully, but these errors were encountered: