I have a horizontal Recyclerview that displays bitmaps. The way it is implemented is that I have an Imageview and a recyclerview underneath. The currently selected item is displayed in the image. A blue background is displayed for the selected image to indicate that it is selected. I can select images from the gallery, and every time a new image is selected, I want to go to the last position and make the item selected.
The list of images is stored in the list of arrays, and every time a new image is added, I add the image to the list and notifyDataChanged ().
Currently, when I snap the view, I switch the visibility of the blue background to
public void onBindViewHolder (final owner of MyRecyclerViewHolder, position int) {}
But the problem is that if the child is turned off, the snap view is not called, and I am not moving to a new position. I read the recycler view documentation and couldn't figure out how to scroll this kind of child view. I don't have a SmoothScrollTo method, but my question is where can I call this?
source
share