Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Update CircularUI.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava committed Apr 13, 2020
1 parent 9893c60 commit 5016f1c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Tizen.Wearable.CircularUI.Forms.Renderer/CircularUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
using System.ComponentModel;
using System.Diagnostics;
using ElmSharp;
using Tizen.Applications;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Tizen;
using XForms = Xamarin.Forms.Forms;
using XApplication = Xamarin.Forms.Application;

namespace Tizen.Wearable.CircularUI.Forms.Renderer
{
Expand Down Expand Up @@ -57,7 +57,6 @@ public static void Init()

public static void Init(string apiKey)
{

if (!string.IsNullOrEmpty(apiKey))
{
GoogleMaps.Init(apiKey);
Expand All @@ -66,7 +65,6 @@ public static void Init(string apiKey)
{
Debug.Assert(!string.IsNullOrEmpty(apiKey), "apiKey is null or empty!");
}

Init();
}

Expand All @@ -86,8 +84,9 @@ public static void Init(InitOptions options)
ThemeLoader.Initialize(resPath);

Init(options.GoogleMapsAPIKey);
}

public static void AddAppPropertyChangedHandler(this Application application)
public static void AddAppPropertyChangedHandler(this XApplication application)
{
UpdateOverlayContent();
application.PropertyChanged += AppOnPropertyChanged;
Expand All @@ -103,7 +102,7 @@ static void AppOnPropertyChanged(object sender, PropertyChangedEventArgs args)

static void UpdateOverlayContent()
{
var renderer = Platform.GetOrCreateRenderer(Application.Current.On<Tizen>().GetOverlayContent());
var renderer = Platform.GetOrCreateRenderer(XApplication.Current.On<Tizen>().GetOverlayContent());
(renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
var nativeView = renderer?.NativeView;
XForms.BaseLayout.SetPartContent("elm.swallow.overlay", nativeView);
Expand Down

0 comments on commit 5016f1c

Please sign in to comment.