diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
index d2c42fc..49f055c 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
@@ -52,6 +52,9 @@
+
+ 2.4.5.909-pre
+
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs b/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
index 72e1935..b6f4b5f 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
+++ b/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
@@ -22,7 +22,8 @@ protected override void OnCreate(Bundle savedInstanceState)
global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental");
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
- LoadApplication(new App());
+ FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
+ LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs b/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
index 3d2ece2..b22fd63 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
@@ -24,7 +24,8 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental");
global::Xamarin.Forms.Forms.Init();
- LoadApplication(new App());
+ FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
+ LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
index 49a7105..4540f38 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
@@ -133,6 +133,9 @@
+
+ 2.4.5.909-pre
+
diff --git a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
index 3ccfc60..887ac3a 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
@@ -11,6 +11,7 @@
+
@@ -19,10 +20,8 @@
MSBuild:UpdateDesignTimeXaml
-
-
-
-
-
+
+ MSBuild:UpdateDesignTimeXaml
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Models/Pizza.cs b/CollectionViewChallenge/CollectionViewChallenge/Models/Pizza.cs
new file mode 100644
index 0000000..03ffb70
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Models/Pizza.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CollectionViewChallenge.Models
+{
+ public class Pizza
+ {
+ public string Name { get; set; }
+ public string ImagePath { get; set; }
+ public string Type { get; set; }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/ViewModels/CVChallangeVM.cs b/CollectionViewChallenge/CollectionViewChallenge/ViewModels/CVChallangeVM.cs
new file mode 100644
index 0000000..99ad5ef
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/ViewModels/CVChallangeVM.cs
@@ -0,0 +1,42 @@
+using CollectionViewChallenge.Models;
+using CollectionViewChallenge.Views;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using Xamarin.Forms;
+
+namespace CollectionViewChallenge.ViewModels
+{
+ public class CVChallangeVM : INotifyPropertyChanged
+ {
+ public ObservableCollection NewPizza { get; set; }
+ public ObservableCollection BestSellers { get; set; }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public CVChallangeVM()
+ {
+ NewPizza = new ObservableCollection(new[] {
+ new Pizza { Name = "Crinkle Fries", ImagePath="https://l1.pizzainindia.com/themes/OLO_v2.1/images/deal/p-1.jpg"},
+ new Pizza { Name = "Crunchy Strip", ImagePath="https://l1.pizzainindia.com/themes/OLO_v2.1/images/deal/p-2.jpg"},
+ new Pizza { Name = "Crunchy Strip", ImagePath="https://l1.pizzainindia.com/themes/OLO_v2.1/images/deal/p-3.jpg"},
+ new Pizza { Name = "Crunchy Strip", ImagePath="https://l1.pizzainindia.com/themes/OLO_v2.1/images/deal/p-4.jpg"}
+ });
+
+
+ BestSellers = new ObservableCollection(new[] {
+ new Pizza { Name = "Peri Peri Chicken", ImagePath="https://l1.pizzainindia.com/assets/osc/ABAAA/images/products/originals/AfricanPeriPeriVegNonVeg.jpg"},
+ new Pizza { Name = "Barbecue Chicken", ImagePath="https://l1.pizzainindia.com/assets/osc/ABAAA/images/products/originals/AussieBarbequeNonVeg.jpg"},
+ new Pizza { Name = "Jerk Chicken", ImagePath="https://l1.pizzainindia.com/assets/osc/ABAAA/images/products/originals/JamaicanJerkNonVeg.jpg"},
+ new Pizza { Name = "Chicken Tikka", ImagePath="https://l1.pizzainindia.com/assets/osc/ABAAA/images/products/originals/IndianTandooriChickenTikka.jpg"}
+ });
+
+
+ }
+
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
index f2da7f7..865d5a5 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
@@ -3,30 +3,131 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:ViewModel="clr-namespace:CollectionViewChallenge.ViewModels"
+ xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
+ xmlns:Hmodel="clr-namespace:CollectionViewChallenge.Models"
mc:Ignorable="d"
x:Class="CollectionViewChallenge.Views.CollectionViewChallengePage">
+
+
+
-
-
-
-
-
- This is a CollectionView!
- Your feedback on the experience of converting a ListView to a CollectionView is incredibly appreciated.
- Here are three general questions:
- 1. How was the experience of converting your existing ListView to a CollectionView?
- 2. How is the performance compared to the ListView?
- 3. Is there a specific piece of functionality that you'd like to see?
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml
new file mode 100644
index 0000000..983a855
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml.cs
new file mode 100644
index 0000000..f1f106d
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/HomePage.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+namespace CollectionViewChallenge.Views
+{
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ public partial class HomePage : ContentPage
+ {
+ public HomePage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file