Skip to content

Commit

Permalink
Updated the latest changes. (#72)
Browse files Browse the repository at this point in the history
1.	Added dark theme support 
2.	Added new credit card payment XAML page
3.	Added ripple effects for touch interaction
4.	Improved the styles applied in XAML pages
5.	Embedded fonts support
6.	Thumbnail view for viewing/selecting the XAML pages.
  • Loading branch information
madasamy99 authored Mar 31, 2021
1 parent 1eded92 commit 14c902b
Show file tree
Hide file tree
Showing 968 changed files with 27,475 additions and 27,113 deletions.
81 changes: 47 additions & 34 deletions EssentialUIKit.Android/EssentialUIKit.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\EssentialUIKit\StyleCop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="Mono.Android.Export" />
Expand All @@ -59,66 +64,74 @@
<PackageReference Include="SkiaSharp.Views.Forms">
<Version>1.68.0</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.Buttons" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.Cards" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.Core" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.Buttons" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.Cards" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.Core" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.DataSource">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.GridCommon">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfCalendar">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfChart">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfComboBox" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfComboBox" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfGauge">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfMaps" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfMaps" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfParallaxView">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfPicker">
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfProgressBar">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Syncfusion.Xamarin.SfRating" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfRotator" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfPopupLayout" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.Expander" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfListView" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfBadgeView" Version="17.4.0.44" />
<PackageReference Include="Syncfusion.Xamarin.SfRating" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfRotator" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfPopupLayout" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.Expander" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfListView" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfBadgeView" Version="18.4.0.31" />
<PackageReference Include="Syncfusion.Xamarin.SfTabView">
<Version>17.4.0.44</Version>
<Version>18.4.0.31</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1821" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4">
<Version>1.0.0.6</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.Android.Material">
<Version>1.2.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
<Version>2.2.0.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Browser">
<Version>1.3.0.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.991250" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Renderers\CalenderDatePickerRenderer.cs" />
<Compile Include="Renderers\ParallaxListViewRenderer.cs" />
<Compile Include="Renderers\BorderlessEditorRenderer.cs" />
<Compile Include="Renderers\BorderlessEntryRenderer.cs" />
<Compile Include="Renderers\TransitionNavigationPageRenderer.cs" />
<Compile Include="Renderers\TemplateHostViewRenderer.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SplashScreenActivity.cs" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Montserrat-Bold.ttf" />
<AndroidAsset Include="Assets\Montserrat-Medium.ttf" />
<AndroidAsset Include="Assets\Montserrat-Regular.ttf" />
<AndroidAsset Include="Assets\Montserrat-SemiBold.ttf" />
<AndroidAsset Include="Assets\UIFontIcons.ttf" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml">
Expand Down Expand Up @@ -232,9 +245,6 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\SplashScreen.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ChatMessageBackground.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-land\ChatMessageBackground.png" />
</ItemGroup>
Expand Down Expand Up @@ -274,6 +284,9 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable\Visa.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ChatMessageBackground.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\build\tools\Syncfusion.CodeAnalysis.StyleCop\tools\StyleCop.MsBuild.targets" Condition="Exists('..\build\tools\Syncfusion.CodeAnalysis.StyleCop\tools\StyleCop.MsBuild.targets')" />
<Target Name="BeforeBuild" Condition=" $(SetVersion) == true ">
Expand Down
6 changes: 3 additions & 3 deletions EssentialUIKit.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace EssentialUIKit.Droid
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
{
this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);

base.OnCreate(savedInstanceState);

Expand All @@ -24,7 +24,7 @@ protected override void OnCreate(Bundle savedInstanceState)
Syncfusion.XForms.Android.PopupLayout.SfPopupLayoutRenderer.Init();

Syncfusion.XForms.Android.Core.Core.Init(this);

this.LoadApplication(new App());

// Change the status bar color
Expand Down
2 changes: 1 addition & 1 deletion EssentialUIKit.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="8" android:versionName="6.1" package="com.syncfusion.xamarin.uikit" android:installLocation="internalOnly">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="8" android:versionName="18.4" package="com.syncfusion.xamarin.uikit" android:installLocation="internalOnly">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<application android:label="Essential UI Kit"></application>
</manifest>
4 changes: 3 additions & 1 deletion EssentialUIKit.Android/Renderers/BorderlessEditorRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ public class BorderlessEditorRenderer : EditorRenderer
{
#region Constructor

public BorderlessEditorRenderer() : base(Application.Context)
public BorderlessEditorRenderer()
: base(Application.Context)
{
}

#endregion

#region Methods

/// <summary>
/// Used to set the transparent color for editor control background property.
/// </summary>
Expand Down
7 changes: 4 additions & 3 deletions EssentialUIKit.Android/Renderers/BorderlessEntryRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace EssentialUIKit.Droid
{
public class BorderlessEntryRenderer : EntryRenderer
{
public BorderlessEntryRenderer() : base(Application.Context)
public BorderlessEntryRenderer()
: base(Application.Context)
{
}

Expand All @@ -20,8 +21,8 @@ protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
if (this.Control != null)
{
this.Control.SetBackground(null);
Control.Gravity = GravityFlags.CenterVertical;
Control.SetPadding(0, 0, 0, 0);
this.Control.Gravity = GravityFlags.CenterVertical;
this.Control.SetPadding(0, 0, 0, 0);
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions EssentialUIKit.Android/Renderers/CalenderDatePickerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace EssentialUIKit.Droid
/// </summary>
public class CalenderDatePickerRenderer : DatePickerRenderer
{
public CalenderDatePickerRenderer(Context context) : base(context)
public CalenderDatePickerRenderer(Context context)
: base(context)
{
}

Expand All @@ -25,10 +26,10 @@ protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e)
if (this.Control != null)
{
this.Control.SetBackground(null);
Control.Text = (e.NewElement as Controls.CalenderDatePicker).PlaceHolderText;
Control.SetTextColor(new Android.Graphics.Color(96, 106, 123));
Control.Gravity = Android.Views.GravityFlags.CenterVertical;
Control.SetPadding(0, 0, 0, 0);
this.Control.Text = (e?.NewElement as Controls.CalenderDatePicker).PlaceHolderText;
this.Control.SetTextColor(new Android.Graphics.Color(96, 106, 123));
this.Control.Gravity = Android.Views.GravityFlags.CenterVertical;
this.Control.SetPadding(0, 0, 0, 0);
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions EssentialUIKit.Android/Renderers/ParallaxListViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,28 @@ public class ParallaxListViewRenderer : ListViewRenderer
{
private int previousScrollPosition;

public ParallaxListViewRenderer(Context context) : base(context)
public ParallaxListViewRenderer(Context context)
: base(context)
{
}

protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
{
base.OnElementChanged(e);
if (e.NewElement != null)
if (e?.NewElement != null)
{
(e.NewElement as ParallaxListView).WidthInPixel = Context.Resources.DisplayMetrics.WidthPixels;
(e.NewElement as ParallaxListView).WidthInPixel = this.Context.Resources.DisplayMetrics.WidthPixels;
if (this.Control != null)
{
this.Control.Scroll += (sender, arg) =>
{
var topView = arg.View.GetChildAt(0);
if (this.Control.FirstVisiblePosition == 0)
{
previousScrollPosition = topView.Top;
this.previousScrollPosition = topView.Top;
}

ParallaxListView.OnScrollChanged(Element, new ScrollChangedEventArgs(previousScrollPosition));
ParallaxListView.OnScrollChanged(this.Element, new ScrollChangedEventArgs(this.previousScrollPosition));
};
}
}
Expand Down
9 changes: 7 additions & 2 deletions EssentialUIKit.Android/Renderers/TemplateHostViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace EssentialUIKit.Droid.Renderers
{
public class TemplateHostViewRenderer : ViewRenderer
{
public TemplateHostViewRenderer(Context context) : base(context)
public TemplateHostViewRenderer(Context context)
: base(context)
{
}

Expand Down Expand Up @@ -55,17 +56,21 @@ protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.V
{
base.OnElementChanged(e);

var pageView = e.NewElement as TemplateHostView;
var pageView = e?.NewElement as TemplateHostView;

#pragma warning disable CA2000 // Dispose objects before losing scope
var nativePage = this.GetNativeView(pageView?.Template, pageView);
#pragma warning restore CA2000 // Dispose objects before losing scope

if (nativePage != null)
{
this.SetNativeControl(nativePage.View);
}
else
{
#pragma warning disable CA2000 // Dispose objects before losing scope
this.SetNativeControl(new TextView(this.Context) { Text = "There is no loaded page" });
#pragma warning restore CA2000 // Dispose objects before losing scope
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Android.Content;
using Android.Support.V4.App;
using EssentialUIKit.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android.AppCompat;

[assembly: ExportRenderer(typeof(NavigationPage), typeof(TransitionNavigationPageRenderer))]

namespace EssentialUIKit.Droid.Renderers
{
public class TransitionNavigationPageRenderer : NavigationPageRenderer
{
public TransitionNavigationPageRenderer(Context context)
: base(context)
{
}

protected override void SetupPageTransition(FragmentTransaction transaction, bool isPush)
{
if (transaction != null)
{
if (isPush)
{
transaction.SetCustomAnimations(Resource.Animation.abc_slide_in_bottom, 0, 0, 0);
}
else
{
transaction.SetCustomAnimations(0, Resource.Animation.abc_slide_out_bottom, 0, 0);
}

base.SetupPageTransition(transaction, isPush);
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions EssentialUIKit.Android/SplashScreenActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@

namespace EssentialUIKit.Droid
{
[Activity(Theme = "@style/Theme.Splash",
MainLauncher = true,
NoHistory = true, Icon = "@drawable/Icon")]
[Activity(Theme = "@style/Theme.Splash", MainLauncher = true, NoHistory = true, Icon = "@drawable/Icon")]
public class SplashScreenActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
Window.DecorView.SystemUiVisibility = (StatusBarVisibility)((int)Window.DecorView.SystemUiVisibility ^ (int)SystemUiFlags.LayoutStable ^ (int)SystemUiFlags.LayoutFullscreen);
Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)((int)this.Window.DecorView.SystemUiVisibility ^ (int)SystemUiFlags.LayoutStable ^ (int)SystemUiFlags.LayoutFullscreen);
this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
base.OnCreate(bundle);
this.StartActivity(typeof(MainActivity));
}
Expand Down
7 changes: 4 additions & 3 deletions EssentialUIKit.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
typeof(Syncfusion.XForms.UWP.PopupLayout.SfPopupLayoutRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.UWP.Expander.SfExpanderRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.UWP.Cards.SfCardViewRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.Pickers.UWP.SfDatePickerRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.UWP.BadgeView.SfBadgeViewRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.UWP.Buttons.SfSegmentedControlRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.SfMaps.XForms.UWP.SfMapsRenderer).GetTypeInfo().Assembly,
typeof(Syncfusion.XForms.UWP.ProgressBar.SfLinearProgressRenderer).GetTypeInfo().Assembly
typeof(Syncfusion.XForms.UWP.ProgressBar.SfLinearProgressRenderer).GetTypeInfo().Assembly,
};
Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
Xamarin.Forms.Forms.Init(e, assembliesToInclude);

if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
if (e?.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
// TODO: Load state from previously suspended application
}
Expand All @@ -93,7 +94,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
rootFrame.Navigate(typeof(MainPage), e?.Arguments);
}

//// Ensure the current window is active
Expand Down
Binary file removed EssentialUIKit.UWP/Assets/Montserrat-Bold.ttf
Binary file not shown.
Binary file removed EssentialUIKit.UWP/Assets/Montserrat-Medium.ttf
Binary file not shown.
Binary file removed EssentialUIKit.UWP/Assets/Montserrat-Regular.ttf
Binary file not shown.
Binary file removed EssentialUIKit.UWP/Assets/Montserrat-SemiBold.ttf
Binary file not shown.
Binary file removed EssentialUIKit.UWP/Assets/UIFontIcons.ttf
Binary file not shown.
Loading

0 comments on commit 14c902b

Please sign in to comment.