I have a RecyclerView
list, in which I want the currently selected item to be shown at the top of the RecyclerView
. I still however, want the entire list to be scrollable, therefore, removing views from above the selected item is not a possible solution.
It seems I need a mechanism where the RecyclerView
items are able to scroll beyond the bounds of the RecyclerView
. I'm not sure if this is possible, so if it is not, does anyone have a solution to ensuring the currently selected item scrolls to the top of the RecyclerView
.
I have tried smoothScrollToPosition()
but this doesn't work in the case of being at the bottom of the RecyclerView
, and wanting one of the middle items to scroll to the top.
Many thanks
to Illustrate, I have a list of 4 items, the recyclerview cannot scroll as there is not enough items in the list.
Then I select an item
I then want the selected item to scroll to top, but for the item above to still be scrollable.
So, when I scroll up...