HorizontalScrollView not Scrolling to Unrendered RecyclerView Items

Nathan Sokalski 4,116 Reputation points
2023-03-19T23:16:52.9566667+00:00

I have a HorizontalScrollView that contains a RecyclerView. However, the HorizontalScrollView only lets me scroll far enough to see the items that are already or partially visible. I believe this is because RecyclerView does not render items until they become visible, which is causing the HorizontalScrollView to think it does not need to scroll any farther. I have tried explicitly calculating & setting the required width of the RecyclerView, but it does not seem to help. How can I get the HorizontalScrollView to scroll far enough to see all the items, or force the RecyclerView to render all items (I am ok with that, because the recycling feature of RecyclerView is not of big concern here)? Thanks.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,291 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,346 questions
{count} votes