So I have a recycler view that has a replies object and I am passing in the id of the object I want to scroll to. How do I get the position of a recyclerview of a passed in id to scroll down using
scrollToPosition(//position)
So I have a recycler view that has a replies object and I am passing in the id of the object I want to scroll to. How do I get the position of a recyclerview of a passed in id to scroll down using
scrollToPosition(//position)
I assume that you use RecyclerView.Adapter as well. So all you need to do to scroll to concrete item is to get its position from adapter - based on for instance some model id. Result of such query would be position which you need to pass to mentioned method.