ೠ. दೞӝ ী Adapterী ؘఠܳ Ҋ ۽Ӓۨझ߄ܳ ࠁৈળ. ੑ۱ػ ఫझ۽ HTTP ۄܳ ా೧ Suggestion ఫझ ܻझܳ ߉ইৡ. ߉ইৡ ܻझܳ ߃ী ח RecyclerView Adapterী ߈ೠ. աݶ ۽Ӓۨझ߄ܳ ऀӟ. ী۞о ߊࢤೞݶ झճ߄ܳ ࠁৈળ. @OnTextChanged(R.id.keyword) public void keywordChanged(String keyword) { if(““.equals(keyword.trim()) return; adapter.clear(); progressBar.setVisibility(VISIBLE); Call<List<String>> suggestions = service.listSuggestions(keyword); suggestions.enqueue(new Callback<List<String>>() { @Override public void onResponse(Call<List<String>> call, Response<List<String>> response) { List<String> texts = response.body(); for (String t : texts) { adapter.add(t); } progressBar.setVisibility(GONE); } @Override public void onFailure(Call<List<String>> call, Throwable t) { SnackBar.make(view, "Something wrong!", LENGTH_LONG).show(); Log.d(TAG, "Error on keywordChanged.", t); } }); } RxTextView.textChanges(R.id.keyword) .map(CharSequence::toString) .map(String::trim) .filter(t -> !"".equals(t)) .flatMap(text -> service.listSuggestions(text)) .flatMapIterable(texts -> texts) .subscribe(adapter::add, e -> { SnackBar.make(view, "Something wrong!", LENGTH_LONG).show(); Log.d(TAG, "Error on keywordChanged.", e); }, () -> progressBar.setVisibility(GONE), __ -> { adapter.clear(); progressBar.setVisibility(VISIBLE); });