RecyclerView in Xamarin.Forms and wrong cell rendering

PawKanarekPawKanarek USMember ✭✭
edited May 2017 in Xamarin.Forms

Hi,

I want to create control in Xamarin.Forms that uses native android RecyclerView as renderer. For base to my code i used the FastCells from TwinTech and XLabs GridView. But TwinTech project is unsupported for more than year and as we know enormous changes was made to Forms in that time.

My problem occurs when i try create cell that contains labels or other controls with HorizontalOptions other than: Default, Fill and FillAndExpand. That labels just don't render themselves (Screenshot below). This is my .xaml cell code

I think that this may be related to this article, which says that LayoutChildren must invoke Measure method, when the Horizontal Options are non-default (look at blue note box).

This is my Cell Container, that is used as ViewHolder for my RecyclerViewAdapter, CellContainer is rendered properly, but children inside it not, and i have no idea why.

What is the best way to get native objects from forms .xaml? Why some labels are invisible? What should i change to render all VisualElemts properly?

Feel free to download my sample project.

Any help will be appreciated, i spent a lot of time on the problem and every idea will be useful.

Sign In or Register to comment.