diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj b/CollectionViewChallenge/CollectionViewChallenge.Android/CollectionViewChallenge.Android.csproj
index d2c42fc..bb293fb 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
@@ -93,6 +92,11 @@
+
+
+
+
+
@@ -102,7 +106,7 @@
- {BA39825E-3CF8-4A31-B120-782B2A651542}
+ {9A9DDEE5-8C48-4274-82D7-22EB79C97206}
CollectionViewChallenge
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.Android/Resources/drawable/dashed_line_5.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/dashed_line_5.png
new file mode 100644
index 0000000..1c86c43
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/dashed_line_5.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_alert_circle.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_alert_circle.png
new file mode 100644
index 0000000..34a78c7
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_alert_circle.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_plane.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_plane.png
new file mode 100644
index 0000000..b52047f
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/icon_plane.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/shadow_1.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/shadow_1.png
new file mode 100644
index 0000000..adf143c
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/shadow_1.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/unknown_airline.png b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/unknown_airline.png
new file mode 100644
index 0000000..fbeab85
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.Android/Resources/drawable/unknown_airline.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
index 49a7105..712c1f9 100644
--- a/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge.iOS/CollectionViewChallenge.iOS.csproj
@@ -123,6 +123,11 @@
+
+
+
+
+
@@ -139,7 +144,7 @@
- {BA39825E-3CF8-4A31-B120-782B2A651542}
+ {9A9DDEE5-8C48-4274-82D7-22EB79C97206}
CollectionViewChallenge
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/dashed_line_5.png b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/dashed_line_5.png
new file mode 100644
index 0000000..1c86c43
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/dashed_line_5.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_alert_circle.png b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_alert_circle.png
new file mode 100644
index 0000000..34a78c7
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_alert_circle.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_plane.png b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_plane.png
new file mode 100644
index 0000000..b52047f
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/icon_plane.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/shadow_1.png b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/shadow_1.png
new file mode 100644
index 0000000..adf143c
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/shadow_1.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/unknown_airline.png b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/unknown_airline.png
new file mode 100644
index 0000000..fbeab85
Binary files /dev/null and b/CollectionViewChallenge/CollectionViewChallenge.iOS/Resources/unknown_airline.png differ
diff --git a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
index 3ccfc60..ee82803 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
+++ b/CollectionViewChallenge/CollectionViewChallenge/CollectionViewChallenge.csproj
@@ -24,5 +24,6 @@
+
\ No newline at end of file
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Converters/RupiahFormatConverter.cs b/CollectionViewChallenge/CollectionViewChallenge/Converters/RupiahFormatConverter.cs
new file mode 100644
index 0000000..f6bfda0
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Converters/RupiahFormatConverter.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Globalization;
+using Xamarin.Forms;
+namespace CollectionViewChallenge.Converters {
+ public class RupiahFormatConverter : IValueConverter {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
+ long curval = System.Convert.ToInt64(value);
+ if (curval == -1) return "-";
+ var dd = curval.ToString("C", System.Globalization.CultureInfo.GetCultureInfo("id-ID"));
+ return ("IDR " + dd.ToLower().Replace("rp", "")).Trim();
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
+ var dd = (value is long ? (long)value : 0).ToString("C", System.Globalization.CultureInfo.GetCultureInfo("id-ID"));
+ return dd.ToLower().Replace("rp", "");
+ }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/ItemSelector.cs b/CollectionViewChallenge/CollectionViewChallenge/ItemSelector.cs
new file mode 100644
index 0000000..25489b3
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/ItemSelector.cs
@@ -0,0 +1,18 @@
+using System;
+using Xamarin.Forms;
+using CollectionViewChallenge.Models;
+
+namespace CollectionViewChallenge {
+ public class ItemSelector : DataTemplateSelector {
+
+ protected override DataTemplate OnSelectTemplate(object item, BindableObject container) {
+ var ticket = (FlightTicket)item;
+ if (ticket.IsFooter) return BlankFooter;
+ else if (ticket.IsHeader) return BlankHeader;
+ else return FlightTemplate;
+ }
+ public DataTemplate FlightTemplate { get; set; }
+ public DataTemplate BlankHeader { get; set; }
+ public DataTemplate BlankFooter { get; set; }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Models/FlightTicket.cs b/CollectionViewChallenge/CollectionViewChallenge/Models/FlightTicket.cs
new file mode 100644
index 0000000..6a2e89d
--- /dev/null
+++ b/CollectionViewChallenge/CollectionViewChallenge/Models/FlightTicket.cs
@@ -0,0 +1,21 @@
+using System;
+namespace CollectionViewChallenge.Models {
+ public class FlightTicket {
+ public string BoardingTime { get; set; }
+ public string DepartureTime { get; set; }
+ public string BoardingAirport { get; set; }
+ public string DepartureAirport { get; set; }
+ public string FlightTime { get; set; }
+ public int Stops { get; set; }
+ public long Price { get; set; }
+ public long PriceCoret {
+ get {
+ return Price + 100000;
+ }
+ }
+ public string AirlineLogo { get; set; }
+ public bool IsHeader { get; set; }
+ public bool IsFooter { get; set; }
+ public bool IsTicket { get; set; }
+ }
+}
diff --git a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
index f2da7f7..b09e3ff 100644
--- a/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
+++ b/CollectionViewChallenge/CollectionViewChallenge/Views/CollectionViewChallengePage.xaml
@@ -1,32 +1,441 @@
-
-
+
+
+
+
+ #2196F3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
- 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