transferwise/sequence-layout

Scroll to particular SequenceStep

Closed this issue · 2 comments

I had taken 30+ SequenceStep in SequenceLayout inside of NestedScrollView

Is there any way to scroll automatically up to selected SequenceStep. For example, If I am activating 25th SequenceStep then it has to scroll 25th position automatically.

Please help. Thanks in advance.

As far as I remember, you can call nestedScrollView.smoothScrollTo(0, childToScrollTo.getBottom()), where childToScrollTo would be the active SequenceStep in your case.

Yeah, Thanks. That I have implemented by following code:

int scrollTo = ((View) view.getParent().getParent()).getTop() + view.getTop();
mBinding.activityMain.nestedScrollView.smoothScrollTo(0, scrollTo);

Thank you again for reply.