using System.Reflection;
using ElmSharp;
using Tizen.Applications;
+using TSystemInfo = Tizen.System.SystemInfo;
namespace Xamarin.Forms.Platform.Tizen
{
public TizenDeviceInfo(FormsApplication formsApplication)
{
- // TODO: obtain screen data from device
- pixelScreenSize = new Size();
- scaledScreenSize = new Size();
- scalingFactor = 0.0;
+ int width = 0;
+ int height = 0;
+
+ TSystemInfo.TryGetValue("http://tizen.org/feature/screen.width", out width);
+ TSystemInfo.TryGetValue("http://tizen.org/feature/screen.height", out height);
+
+ scalingFactor = 1.0; // scaling is disabled, we're using pixels as Xamarin's geometry units
+ pixelScreenSize = new Size(width, height);
+ scaledScreenSize = new Size(width / scalingFactor, height / scalingFactor);
}
}
"ElmSharp": "1.1.0-*",
"NETStandard.Library": "1.6.0",
"System.Runtime.Serialization.Xml": "4.1.1",
- "Tizen.Applications": "1.0.2"
+ "Tizen.Applications": "1.0.2",
+ "Tizen.System": "1.0.5"
},
"frameworks": {
"netstandard1.6": {
# C# API Requires
BuildRequires: csapi-tizen-nuget
BuildRequires: csapi-application-nuget
+BuildRequires: csapi-system-nuget
BuildRequires: elm-sharp-nuget
%description