Open OVERSKY2003 opened 8 years ago
there is another handler that does it think. The current touchevent is blocked from the view.
那我要如何做,才能实现点击或者滑动RecyclerView,收起键盘的功能?
@jjhesk,what is another handler so that I can setOnTouchListener on UltimateRecyclerView?
I used setScrollViewCallbacks and hide keybroad when onScrollChanged. It works
@OVERSKY2003 interesting solution. can u post out and share the code with us?
mRecyclerView.setScrollViewCallbacks(new ObservableScrollViewCallbacks() {
@Override
public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {
hideSoftinput(mMobile);
}
@Override
public void onDownMotionEvent() {
hideSoftinput(mMobile);
}
@Override
public void onUpOrCancelMotionEvent(ObservableScrollState observableScrollState) {
}
});
我想实现滑动RecyclerView是收起键盘,发现setOnTouchListener无效,代码如下: