diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj index d2c42fc..32ee061 100644 --- a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj +++ b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj @@ -106,5 +106,11 @@ CollectionViewChallenge + + + + + + \ No newline at end of file diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/iphone6.jpeg b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/iphone6.jpeg new file mode 100644 index 0000000..1e8208e Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/iphone6.jpeg differ diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/star.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/star.png new file mode 100644 index 0000000..e29a890 Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/star.png differ diff --git a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj index 3ccfc60..b64b797 100644 --- a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj +++ b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj @@ -22,7 +22,6 @@ - \ No newline at end of file diff --git a/CollectionViewChallenge/CollectionViewChallenge/Models/ListItem.cs b/CollectionViewChallenge/CollectionViewChallenge/Models/ListItem.cs new file mode 100644 index 0000000..59d7206 --- /dev/null +++ b/CollectionViewChallenge/CollectionViewChallenge/Models/ListItem.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Xamarin.Forms; + +namespace CollectionViewChallenge.Models +{ + public class ListItem + { + public string Title { get; set; } + public string Description { get; set; } + public string Price { get; set; } + public string Percentage { get; set; } + + } +} diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml index f2da7f7..fa47fe2 100644 --- a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml +++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml @@ -6,26 +6,53 @@ 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? - - + - - + + + + + + + + + + + + + + + diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs index 701124f..05aec2e 100644 --- a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs +++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs @@ -1,4 +1,5 @@ -using System; +using CollectionViewChallenge.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -16,5 +17,20 @@ public CollectionViewChallengePage() { InitializeComponent(); } + protected override void OnAppearing() + { + base.OnAppearing(); + + List listItems = new List(); + ListItem listItem = new ListItem() {Title="iPhone",Description="2GB RAM, 16GB Internal", Price="$500" ,Percentage="50%"}; + ListItem listItem1 = new ListItem() { Title = "iPhone", Description = "2GB RAM, 16GB Internal", Price = "$500", Percentage = "50%" }; + ListItem listItem2 = new ListItem() { Title = "iPhone", Description = "2GB RAM, 16GB Internal", Price = "$500", Percentage = "50%" }; + ListItem listItem3 = new ListItem() { Title = "iPhone", Description = "2GB RAM, 16GB Internal", Price = "$500", Percentage = "50%" }; + listItems.Add(listItem); + listItems.Add(listItem1); + listItems.Add(listItem2); + listItems.Add(listItem3); + collectionList.ItemsSource = listItems; + } } } \ No newline at end of file