summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-04-25 20:52:52 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-04-25 21:02:26 +0900
commit61aefae04b391f82656cec097c3640c33586503f (patch)
treeee9613874100eeb09023705d72d37f56dc73d875
parent35bd510810badc0628ca3850b4347d6725375fdb (diff)
downloadxamarin-forms-61aefae04b391f82656cec097c3640c33586503f.tar.gz
xamarin-forms-61aefae04b391f82656cec097c3640c33586503f.tar.bz2
xamarin-forms-61aefae04b391f82656cec097c3640c33586503f.zip
Change-Id: If9aa1d762364ef185593eb2bb38d1bbcd9d3ed6b
-rw-r--r--Xamarin.Forms.Platform.Tizen/Forms.cs13
-rw-r--r--packaging/xamarin-forms-tizen.spec2
2 files changed, 9 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Forms.cs b/Xamarin.Forms.Platform.Tizen/Forms.cs
index 555b149e..57fc6050 100644
--- a/Xamarin.Forms.Platform.Tizen/Forms.cs
+++ b/Xamarin.Forms.Platform.Tizen/Forms.cs
@@ -12,11 +12,16 @@ namespace Xamarin.Forms.Platform.Tizen
{
public static class Forms
{
+ static Lazy<string> s_profile = new Lazy<string>(() =>
+ {
+ //TODO : Fix me if elm_config_profile_get() unavailable
+ return Elementary.GetProfile();
+ });
+
static Lazy<int> s_dpi = new Lazy<int>(() =>
{
int dpi = 0;
- var info = Device.Info as TizenDeviceInfo;
- if (info != null && info.Profile == "tv")
+ if (s_profile.Value == "tv")
{
// Use fixed DPI value (72) if TV profile
return 72;
@@ -75,9 +80,6 @@ namespace Xamarin.Forms.Platform.Tizen
public TizenDeviceInfo(FormsApplication formsApplication)
{
- //TODO : Fix me if elm_config_profile_get() unavailable
- profile = Elementary.GetProfile();
-
int width = 0;
int height = 0;
@@ -92,6 +94,7 @@ namespace Xamarin.Forms.Platform.Tizen
pixelScreenSize = new Size(width, height);
scaledScreenSize = new Size(width / scalingFactor, height / scalingFactor);
+ profile = s_profile.Value;
}
}
diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec
index 08cccea1..f996e7f5 100644
--- a/packaging/xamarin-forms-tizen.spec
+++ b/packaging/xamarin-forms-tizen.spec
@@ -2,7 +2,7 @@
%define XF_RELEASE 233
# Increase this XF_DEV_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed.
-%define XF_DEV_VERSION 001
+%define XF_DEV_VERSION 002
Name: xamarin-forms-tizen
Summary: Xamarin.Forms for Tizen platform