JakeWharton / RxBinding

RxJava binding APIs for Android's UI widgets.
Apache License 2.0
9.69k stars 971 forks source link

RecyclerView keyevent move fast on TV #535

Open VeiZhang opened 4 years ago

VeiZhang commented 4 years ago

Other view, I can use RxView.keys to control. But for recycler view item, because of long press keyevent, recycler view move fast, how to use rxbinding to control it?

JakeWharton commented 4 years ago

I'm not really sure what you're asking. RxBinding just adapts listener-based callbacks to RxJava-based ones. Can you model what you want with the listener? If so, it should be easy for us to translate it to the RxJava equivalent.

VeiZhang commented 4 years ago

@JakeWharton Hello, I will try to display.

I test the situation in TV with RCU.

Normal view keyevent like this, when I use long press keyevent, the keyevent send intermal with about 50ms, that's what I want:

RxView.keys(mProgressBar, keyEvent -> progressKeyProcessor(mProgressBar, keyEvent.getKeyCode(), keyEvent))
                .subscribe();

But for recyclerview, I try to translate for each view in adapter, I also try to translate recyclerview keyevent, but it not work. Normally using long press keyevent in recyclerview, it scroll fastly, because the keyevent send fast. I want to slow it down like normal view.

Can u understand? How to do it, thanks a lot.

36289108 commented 2 years ago

- [ ] - hola[]()@ `bjjggkih```