{ @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable editText) { if(editText.length() > 3) { mSearchHandler.obtainMessage(SEARCH_MSG, editText.toString()).sendToTarget(); } } });
private PublishSubject<Event> mSubject; @Override public void onCreate() { super.onCreate(); mSubject = PublishSubject.create(); } // This should be replaced with Dependency Injection public PublishSubject<Event> getSubject() { return mSubject; } }