ScrollView value changed callback

Is there any way to handle scrollOffset’s changes of the ScrollView?
Would be REALLY good to have support for ChangeEvent (for example by having ScrollView implement INotifyValueChanged)

I mean I can check wether scrollOffset did change if I use scheduler.Execute(ProcessScrollOffset).Until(() => false), but that seems like a bad practice.

I would also like to mention here that PostPointerUpAnimation executes at static 30ms which produces jittery behaviour.

1 Like

You can register value changes on the ScrollView’s Scrollers instead.

scrollView.horizontalScroller.slider.RegisterValueChangedCallback(...);
scrollView.verticalScroller.slider.RegisterValueChangedCallback(...);

I agree it would be nice to have a callback on the ScrollView directly. You can report a bug using Help -> Report a Bug... to get it in our pipeline. Same for the PostPointerUpAnimation animation interval.

1 Like

Whoah, nice. Somewhy I though that if I have disabled scrollers they don’t produce events, my bad.

Great to hear that! Please, check IN-42607

Actually I already did this, but recieved a comment ‘not enough information to reproduce’
Please, check IN-42122 for that. I’m not sure what else should I do, hope you will be able to review that case and forward it to your internal pipeline.

2 Likes