I'm using a recyclerView to support an item selection function for an android app, where each item of recyclerView will be a same sized image view. When creating the recyclerView, I already know that the n-th item is the selected one, how do I directly display the n-th item in center or just make it visible?
UPDATE: So I achieved this by first calling linearLayout.scrollToPosition(n-th position) to make the item visible, then adding a addOnGlobalLayoutListener, which will wait for the layout to be complete, then calculate the offset and do a smooth scroll to center.