Skip to content

Commit

Permalink
Fix Essentials (#146)
Browse files Browse the repository at this point in the history
* Fix Essentials sample for tizen

* Add SemanticScreenReader for Tizen

* Fix Startup
  • Loading branch information
sung-su authored and rookiejava committed Dec 6, 2021
1 parent fced42d commit 8c8da44
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/Essentials/samples/Samples/Startup.cs
Expand Up @@ -18,19 +18,6 @@ public static MauiApp CreateMauiApp()
"RJHqIE53Onrqons5CNOx~FrDr3XhjDTyEXEjng-CRoA~Aj69MhNManYUKxo6QcwZ0wmXBtyva0zwuHB04rFYAPf7qqGJ5cHb03RCDw1jIW8l";
#endif
appBuilder
.ConfigureServices(services =>
{
#if TIZEN
services.AddTransient((_) =>
{
var option = new InitializationOptions
{
DisplayResolutionUnit = DisplayResolutionUnit.DP(true),
};
return option;
});
#endif
})
.ConfigureLifecycleEvents(lifecycle =>
{
#if __IOS__
Expand All @@ -53,10 +40,24 @@ public static MauiApp CreateMauiApp()
.OnActivated((window, e) =>
Microsoft.Maui.Essentials.Platform.OnActivated(window, e));
});
#elif TIZEN
Microsoft.Maui.Essentials.Platform.Init(CoreUIAppContext.GetInstance(MauiApplication.Current).MainWindow);
#endif
})
.UseMauiApp<App>();

#if TIZEN
appBuilder
.Services.AddTransient((_) =>
{
var option = new InitializationOptions
{
DisplayResolutionUnit = DisplayResolutionUnit.DP(true),
};
return option;
});
#endif

return appBuilder.Build();
}
}
Expand Down
@@ -0,0 +1,10 @@
namespace Microsoft.Maui.Essentials
{
public static partial class SemanticScreenReader
{
static void PlatformAnnounce(string text)
{
_ = ElmSharp.Accessible.AccessibleUtil.Say(text, true);
}
}
}

0 comments on commit 8c8da44

Please sign in to comment.