Skip to content

Commit

Permalink
Fix scroll height in a hacky way. Open issue: xamarin/Xamarin.Forms#6451
Browse files Browse the repository at this point in the history
  • Loading branch information
Mantas330BJ committed Oct 9, 2021
1 parent adfc1f7 commit 3f33b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Wasted/Pages/FoodPlacePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public void InitializeViews()
{
contentScrollView.BindingContext = SelectedFoodPlace;
dealsCollectionView.ItemsSource = SelectedFoodPlace.Deals;

const int dealHeight = 220;
dealsCollectionView.HeightRequest = dealHeight * ((SelectedFoodPlace.Deals.Count + 1) / 2); //Two items in one row
}

/// <summary>
Expand Down

0 comments on commit 3f33b4b

Please sign in to comment.