Closed thaihung203 closed 9 years ago
Yes it works perfectly on android. Not on iOS though. Please pester xamarin to improve the Api.
Sure I will, I never do iOS before (so maybe it's a stupid question) but should we rewrite the ListView renderer instead using the default to overcome this ?
Please refer to my previous comment. If you ask in the forums lots of people will help you. If you ask here you will not get assistance. That's not what the issue tracker is for.
Hi,
I found why the UnEvenRowHeight isn't rendered correctly. The problem is when we using cache, the SetupCell will not be called for every OnBindingContextChanged. One another fix is using
this.Height = mediaItem.RowHeight;
instead of
View.HeightRequest = mediaItem.RowHeight
so in your UnevenFastCell.xaml.cs example, I just put a dummy OnBindingContextChanged like follow
protected override void OnBindingContextChanged ()
{
base.OnBindingContextChanged ();
var mediaItem = BindingContext as UnevenSizedMediaItem;
this.Height = mediaItem.RowHeight;
}
then it works like a charm:)
Hope that help.
That helps a lot. I looked at their code and misread that you can set the cell height directly!
Not sure why setup cell wasn't called though. Perhaps because of the change to not cache so heavily.
It looks like setup cell Methodist not even be required.
Really appreciate your efforts with this. If you follow the checking you know I'm busy with gestures right now so not had time to look at cells.
Good work. Glad it paid off for you :)
Sent from my iPhone
On 2 Aug 2015, at 05:58, thaihung203 notifications@github.com wrote:
Hi, I found why the UnEvenRowHeight isn't rendered correctly. The problem is when we using cache, the SetupCell will not be called for every OnBindingContextChanged. One another fix is using this.Height = mediaItem.RowHeight; instead of
View.HeightRequest = mediaItem.RowHeight so in your UnevenFastCell.xaml.cs example, I just put a dummy OnBindingContextChanged like follow
protected override void OnBindingContextChanged () { base.OnBindingContextChanged (); var mediaItem = BindingContext as UnevenSizedMediaItem; this.Height = mediaItem.RowHeight; }
then it works like a charm:)
Hope that help.
— Reply to this email directly or view it on GitHub.
It's seem like uneven row height work on Android with the lastest Xamarin.Form, I not test on IOS yet