diff --git a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj index 82e6221..c02699c 100644 --- a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj +++ b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj @@ -53,9 +53,15 @@ + + 2.4.11.982 + + + 1.2.1 + diff --git a/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs b/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs index fd4e22a..9808500 100644 --- a/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs +++ b/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs @@ -21,6 +21,7 @@ protected override void OnCreate(Bundle savedInstanceState) global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental"); Xamarin.Essentials.Platform.Init(this, savedInstanceState); + FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); } diff --git a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj index 155cd56..5bc1e24 100644 --- a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj +++ b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj @@ -129,8 +129,14 @@ + + 2.4.11.982 + + + 1.2.1 + diff --git a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj index 198ec7f..87043b6 100644 --- a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj +++ b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj @@ -6,12 +6,10 @@ + - - - - - + + diff --git a/CarouselViewChallenge/CarouselViewChallenge/Models/CategoryClass.cs b/CarouselViewChallenge/CarouselViewChallenge/Models/CategoryClass.cs new file mode 100644 index 0000000..e05e380 --- /dev/null +++ b/CarouselViewChallenge/CarouselViewChallenge/Models/CategoryClass.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace CarouselViewChallenge.Models +{ + public class CategoryClass + { + public string ImageUrl { get; set; } + public string Text { get; set; } + public string SubText { get; set; } + public string GradientStartColor { get; set; } + public string GradientEndColor { get; set; } + + } +} diff --git a/CarouselViewChallenge/CarouselViewChallenge/Models/CorousalClass.cs b/CarouselViewChallenge/CarouselViewChallenge/Models/CorousalClass.cs new file mode 100644 index 0000000..6d94a1d --- /dev/null +++ b/CarouselViewChallenge/CarouselViewChallenge/Models/CorousalClass.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace CarouselViewChallenge.Models +{ + public class CorousalClass + { + public string ImageUrl { get; set; } + public string Text { get; set; } + public string Count { get; set; } + public string Amount { get; set; } + public string GradientStartColor { get; set; } + public string GradientEndColor { get; set; } + + } + +} diff --git a/CarouselViewChallenge/CarouselViewChallenge/ViewModels/CarouselViewChallengeViewModel.cs b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/CarouselViewChallengeViewModel.cs new file mode 100644 index 0000000..678329c --- /dev/null +++ b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/CarouselViewChallengeViewModel.cs @@ -0,0 +1,15 @@ +using CarouselViewChallenge.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CarouselViewChallenge.ViewModels +{ + public class CarouselViewChallengeViewModel + { public List CorousalClassList { get; set; } = new List(); + + public List CategoryClassList { get; set; } = new List(); + + + } +} diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml index 1a7cc0d..cdd7dbe 100644 --- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml +++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml @@ -1,13 +1,191 @@  - + - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs index 38f2e9f..ede6133 100644 --- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs +++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs @@ -1,4 +1,6 @@ -using System; +using CarouselViewChallenge.Models; +using CarouselViewChallenge.ViewModels; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -15,6 +17,68 @@ public partial class CarouselViewChallengePage : ContentPage public CarouselViewChallengePage() { InitializeComponent(); + + BindingContext = new CarouselViewChallengeViewModel + { + CorousalClassList = new List() + { + new CorousalClass + { + Text = "Universal Principle of Design", + Count = "10,023 Learners", + Amount = "$109", + ImageUrl = "https://devoirtech.com/pen.png", + GradientStartColor="#7655EE", + GradientEndColor="#A875EB" + + }, + new CorousalClass + { + Text = "User Experiance Design Fundamentals", + Count = "10,023 Learners", + Amount = "$109", + ImageUrl = "https://devoirtech.com/pen.png", + GradientStartColor="#fa8765", + GradientEndColor="#e686cd" + } + } + + , + CategoryClassList = new List() { + new CategoryClass + { + Text = "Marketing", + SubText = "25 Cources", + + ImageUrl = "https://devoirtech.com/pie.png", + GradientStartColor="#27a9ff", + GradientEndColor="#05d8ea" + + }, + new CategoryClass + { + Text = "Development", + SubText = "25 Cources", + + ImageUrl = "https://devoirtech.com/coding.png", + GradientStartColor="#fd7e60", + GradientEndColor="#fcaa76" + + }, + new CategoryClass + { + Text = "Photography", + SubText = "25 Cources", + + ImageUrl = "https://devoirtech.com/camera.png", + GradientStartColor="#07eab7", + GradientEndColor="#5aeba8" + + } + } + }; } } + + } \ No newline at end of file