Skip to content

Commit

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

* Remove UseSkiaSharp flag

* Remove MaterialComponents

* Fix Tizen flag

* Remove CustomRenderer
  • Loading branch information
sung-su authored and myroot committed Aug 25, 2022
1 parent 44f1701 commit 381069f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/Essentials/samples/Samples/Essentials.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" ExcludeAssets="runtime" />
</ItemGroup>

<ItemGroup Condition="'$(UseMaui)' != 'true' and $(TargetFramework.Contains('-tizen'))">
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" ExcludeAssets="runtime" />
<PackageReference Include="Tizen.NET" Version="8.0.0.15631" />
</ItemGroup>

<ItemGroup Condition=" '$(UseMaui)' != 'true' ">
<ProjectReference Include="..\..\..\Essentials\src\Essentials.csproj" />
<ProjectReference Include="..\..\..\Core\src\Core.csproj" />
Expand All @@ -47,4 +52,4 @@

<Import Project="$(MauiSrcDirectory)Maui.InTree.props" Condition=" '$(UseMaui)' != 'true' " />

</Project>
</Project>
2 changes: 1 addition & 1 deletion src/Essentials/samples/Samples/Platforms/Tizen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ static void Main(string[] args)
app.Run(args);
}
}
}
}
15 changes: 15 additions & 0 deletions src/Essentials/samples/Samples/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ public static MauiApp CreateMauiApp()
essentials.OnAppAction(App.HandleAppActions);
});

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

return builder.Build();
}
}
Expand Down

0 comments on commit 381069f

Please sign in to comment.