私の質問は2倍です。私はRxSearchView
を使っていました。私はmap
,filter
そして最後にswitchMap
を使って、apiからの検索イベントを問い合わせました。まずmap
またはfilter
機能では、私はこのようなUIを更新しました:RxSearchView検索
.filter(new Predicate<String>() {
@Override
public boolean test(String s) throws Exception {
if (searchViewQueryTextEvent.queryText().toString().length() < 3 && mUserList != null) {
mUserList.clear();
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
mUserSearchAdapter.notifyDataSetChanged();
}
});
}
return s.length() > 2;
}
})
だから、これらの関数の内部からUIを更新し続けることをお勧めですか? 第2に、文字の削除はこの方法では処理できませんでした。私に提案やリンクを教えてください。私はRxに新しいです。どうもありがとう!
これは大きな助けになります。あなたの指導に感謝します。私はあなたのDroidconの話を見てください:) – Debdeep