use fixed DPI value (72) on TV profile
authorKangho Hur <kangho.hur@samsung.com>
Tue, 25 Apr 2017 08:36:30 +0000 (17:36 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Mon, 10 Jul 2017 02:11:24 +0000 (11:11 +0900)
Change-Id: I84034fc407d9ea58d40cde24f5d0b52edea19491

Xamarin.Forms.Platform.Tizen/Forms.cs

index d9b73bf..555b149 100644 (file)
@@ -15,6 +15,12 @@ namespace Xamarin.Forms.Platform.Tizen
                static Lazy<int> s_dpi = new Lazy<int>(() =>
                {
                        int dpi = 0;
+                       var info = Device.Info as TizenDeviceInfo;
+                       if (info != null && info.Profile == "tv")
+                       {
+                               // Use fixed DPI value (72) if TV profile
+                               return 72;
+                       }
                        TSystemInfo.TryGetValue<int>("http://tizen.org/feature/screen.dpi", out dpi);
                        return dpi;
                });
@@ -69,6 +75,9 @@ 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;
 
@@ -83,9 +92,6 @@ namespace Xamarin.Forms.Platform.Tizen
 
                                pixelScreenSize = new Size(width, height);
                                scaledScreenSize = new Size(width / scalingFactor, height / scalingFactor);
-
-                               //TODO : Fix me if elm_config_profile_get() unavailable
-                               profile = Elementary.GetProfile();
                        }
                }