diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/OpenSans-Light.ttf b/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/OpenSans-Light.ttf
new file mode 100644
index 0000000..0d38189
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/OpenSans-Light.ttf differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/materialdesignicons-webfont.ttf b/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/materialdesignicons-webfont.ttf
new file mode 100755
index 0000000..75cde78
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Assets/materialdesignicons-webfont.ttf differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
index d2c42fc..1bab33c 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
@@ -15,7 +15,6 @@
Properties\AndroidManifest.xml
Resources
Assets
- false
v8.1
true
Xamarin.Android.Net.AndroidClientHandler
@@ -62,6 +61,15 @@
+
+ 1.1.0
+
+
+ 3.6.0.344457
+
+
+ 3.0.0.5
+
@@ -102,9 +110,13 @@
- {BA39825E-3CF8-4A31-B120-782B2A651542}
+ {9A9DDEE5-8C48-4274-82D7-22EB79C97206}
CollectionViewChallenge
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs b/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
index 72e1935..0cfad10 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
+++ b/CollectionViewChallenge/CollectionViewChallenge.Android/MainActivity.cs
@@ -6,6 +6,8 @@
using Android.Views;
using Android.Widget;
using Android.OS;
+using Sharpnado.Presentation.Forms.Droid;
+using ImageCircle.Forms.Plugin.Droid;
namespace CollectionViewChallenge.Droid
{
@@ -22,6 +24,10 @@ 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);
+ global::Xamarin.FormsMaps.Init(this, savedInstanceState);
+ SharpnadoInitializer.Initialize();
+ ImageCircleRenderer.Init();
+
LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Properties/AndroidManifest.xml b/CollectionViewChallenge/CollectionViewChallenge.Android/Properties/AndroidManifest.xml
index 8a8223a..0a62e2d 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.Android/Properties/AndroidManifest.xml
+++ b/CollectionViewChallenge/CollectionViewChallenge.Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs b/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
index 3d2ece2..b05804b 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/AppDelegate.cs
@@ -3,6 +3,8 @@
using System.Linq;
using Foundation;
+using ImageCircle.Forms.Plugin.iOS;
+using Sharpnado.Presentation.Forms.iOS;
using UIKit;
namespace CollectionViewChallenge.iOS
@@ -24,7 +26,10 @@ 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();
+ global::Xamarin.FormsMaps.Init();
LoadApplication(new App());
+ SharpnadoInitializer.Initialize();
+ ImageCircleRenderer.Init();
return base.FinishedLaunching(app, options);
}
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
index 49a7105..32deff9 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
@@ -123,6 +123,8 @@
+
+
@@ -135,11 +137,20 @@
+
+ 1.1.0
+
+
+ 3.6.0.344457
+
+
+ 3.0.0.5
+
- {BA39825E-3CF8-4A31-B120-782B2A651542}
+ {9A9DDEE5-8C48-4274-82D7-22EB79C97206}
CollectionViewChallenge
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Info.plist b/CollectionViewChallenge/CollectionViewChallenge.iOS/Info.plist
index 82bd07d..f3f3e5c 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/Info.plist
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/Info.plist
@@ -2,37 +2,42 @@
- UIDeviceFamily
-
- 1
- 2
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- MinimumOSVersion
- 8.0
- CFBundleDisplayName
- CollectionViewChallenge
- CFBundleIdentifier
- com.companyname.CollectionViewChallenge
- CFBundleVersion
- 1.0
- UILaunchStoryboardName
- LaunchScreen
- CFBundleName
- CollectionViewChallenge
- XSAppIconAssets
- Assets.xcassets/AppIcon.appiconset
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ MinimumOSVersion
+ 8.0
+ CFBundleDisplayName
+ CollectionViewChallenge
+ CFBundleIdentifier
+ com.companyname.CollectionViewChallenge
+ CFBundleVersion
+ 1.0
+ UILaunchStoryboardName
+ LaunchScreen
+ CFBundleName
+ CollectionViewChallenge
+ XSAppIconAssets
+ Assets.xcassets/AppIcon.appiconset
+ UIAppFonts
+
+ materialdesignicons-webfont.ttf
+ OpenSans-Light.ttf
+
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/OpenSans-Light.ttf b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/OpenSans-Light.ttf
new file mode 100644
index 0000000..0d38189
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/OpenSans-Light.ttf differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/materialdesignicons-webfont.ttf b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/materialdesignicons-webfont.ttf
new file mode 100755
index 0000000..75cde78
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/materialdesignicons-webfont.ttf differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge/App.xaml b/CollectionViewChallenge/CollectionViewChallenge/App.xaml
index 5477c51..c7d31e3 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/App.xaml
+++ b/CollectionViewChallenge/CollectionViewChallenge/App.xaml
@@ -1,8 +1,21 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+ #F8F8F8
+ #008DA8
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/AppShell.xaml b/CollectionViewChallenge/CollectionViewChallenge/AppShell.xaml
index 9364c60..0172b42 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/AppShell.xaml
+++ b/CollectionViewChallenge/CollectionViewChallenge/AppShell.xaml
@@ -52,7 +52,7 @@
-->
- #2196F3
+ #008DA8
+
+
-
-
-
-
-
- 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/CollectionViewChallengePage.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs
index 701124f..d902f68 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml.cs
@@ -1,20 +1,120 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using CollectionViewChallenge.Models;
using Xamarin.Forms;
+using Xamarin.Forms.Maps;
using Xamarin.Forms.Xaml;
namespace CollectionViewChallenge.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class CollectionViewChallengePage : ContentPage
+ public partial class CollectionViewChallengePage : ContentPage, INotifyPropertyChanged
{
+ private int _selectedViewModelIndex = 0;
+ public int SelectedViewModelIndex
+ {
+ get => _selectedViewModelIndex;
+ set
+ {
+ _selectedViewModelIndex = value;
+ OnPropertyChanged();
+ }
+ }
+
+ private ObservableCollection _stats = new ObservableCollection();
+ public ObservableCollection Stats
+ {
+ get => _stats;
+ set
+ {
+ _stats = value;
+ OnPropertyChanged();
+ }
+ }
+
+ private ObservableCollection _kudos = new ObservableCollection();
+ public ObservableCollection Kudos
+ {
+ get => _kudos;
+ set
+ {
+ _kudos = value;
+ OnPropertyChanged();
+ }
+ }
+
+ private ObservableCollection _pins = new ObservableCollection();
+ public ObservableCollection Pins
+ {
+ get => _pins;
+ set
+ {
+ _pins = value;
+ OnPropertyChanged();
+ }
+ }
+
public CollectionViewChallengePage()
{
InitializeComponent();
+
+ #region Init data
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "24,5 km",
+ DisplayDescription = "total distance",
+ Icon = MaterialFontIcons.MapMarker
+ });
+
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "27,1 km",
+ DisplayDescription = "average speed",
+ Icon = MaterialFontIcons.Speedometer
+ });
+
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "43,5 km",
+ DisplayDescription = "max speed",
+ Icon = MaterialFontIcons.Speedometer
+ });
+
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "1h 13m",
+ DisplayDescription = "moving time",
+ Icon = MaterialFontIcons.Timer
+ });
+
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "124,0m",
+ DisplayDescription = "elevation gain",
+ Icon = MaterialFontIcons.ImageFilterHdr
+ });
+
+ Stats.Add(new StatisticsDetail()
+ {
+ DisplayValue = "146 bpm",
+ DisplayDescription = "average heart rate",
+ Icon = MaterialFontIcons.HeartOutline
+ });
+
+ Kudos.Add(new KudosDetail() { Name = "Bart Lannoeye", Image = "http://dgalywyr863hv.cloudfront.net/pictures/athletes/9979653/3476575/1/medium.jpg" });
+ Kudos.Add(new KudosDetail() { Name = "David Ortinau", Image = "http://dgalywyr863hv.cloudfront.net/pictures/athletes/1044152/247516/12/medium.jpg" });
+ Kudos.Add(new KudosDetail() { Name = "Tim Heuer", Image = "http://dgalywyr863hv.cloudfront.net/pictures/athletes/5534914/1702130/2/medium.jpg" });
+ Kudos.Add(new KudosDetail() { Name = "Jan Karger", Image = "http://dgalywyr863hv.cloudfront.net/pictures/athletes/6182165/1891567/5/medium.jpg" });
+ Kudos.Add(new KudosDetail() { Name = "Jan Van de Poel", Image = "http://dgalywyr863hv.cloudfront.net/pictures/athletes/2327722/7025716/2/medium.jpg" });
+
+ Pins.Add(new Location() { Description = "Begin", Position = new Position(51.098761, 4.607192) });
+ Pins.Add(new Location() { Description = "End", Position = new Position(51.028056, 4.605201) });
+
+ CycleMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(51.056214, 4.630840), Distance.FromKilometers(8)));
+
+ #endregion
+
+ BindingContext = this;
}
}
}
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml
new file mode 100644
index 0000000..66e6bbb
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml.cs
new file mode 100644
index 0000000..d997024
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CommentsView.xaml.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+namespace CollectionViewChallenge.Views
+{
+ public partial class CommentsView : ContentView
+ {
+ public CommentsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml
new file mode 100644
index 0000000..1d83d11
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml.cs
new file mode 100644
index 0000000..80cedaf
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/KudosView.xaml.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+namespace CollectionViewChallenge.Views
+{
+ public partial class KudosView : ContentView
+ {
+ public KudosView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml
new file mode 100644
index 0000000..6c53adb
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml.cs b/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml.cs
new file mode 100644
index 0000000..f11b19e
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/StatsView.xaml.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+namespace CollectionViewChallenge.Views
+{
+ public partial class StatsView : ContentView
+ {
+ public StatsView()
+ {
+ InitializeComponent();
+ }
+ }
+}