readonly double scalingFactor;
+ readonly string profile;
+
public override Size PixelScreenSize
{
get
}
}
+ public string Profile
+ {
+ get
+ {
+ return this.profile;
+ }
+ }
+
public TizenDeviceInfo(FormsApplication formsApplication)
{
int width = 0;
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);
+
+ //TODO : Fix me if elm_config_profile_get() unavailable
+ profile = Elementary.GetProfile();
}
}
});
}
- // FIXME: We should consider TV and Common (Desktop) profiles also.
- Device.Idiom = TargetIdiom.Phone;
+ // TODO: We should consider various tizen profiles such as TV, Wearable and so on.
+ string profile = ((TizenDeviceInfo)Device.Info).Profile;
+ if (profile == "mobile")
+ {
+ Device.Idiom = TargetIdiom.Phone;
+ }
+ else if (profile == "tv" || profile == "desktop")
+ {
+ Device.Idiom = TargetIdiom.Desktop;
+ }
+ else
+ {
+ Device.Idiom = TargetIdiom.Unsupported;
+ }
+
ExpressionSearch.Default = new TizenExpressionSearch();
IsInitialized = true;
}
public double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes)
{
+ double baseSize = 10;
+ double baseSizeSpan = 2;
+
+ // TODO: Fix me when TargetIdiom.TV avaialbe on mainline
+ // In case of TV profile The base named size sholud be lager than mobile profile
+ if (Device.Idiom == TargetIdiom.Desktop)
+ {
+ // TODO: These valuse should be updated when TV profile UX guideline released.
+ baseSize = 60;
+ baseSizeSpan = 5;
+ }
+
switch (size)
{
case NamedSize.Micro:
- return 10;
+ return baseSize;
case NamedSize.Small:
- return 12;
+ return baseSize + baseSizeSpan;
case NamedSize.Default:
case NamedSize.Medium:
- return 14;
+ return baseSize + (baseSizeSpan * 2);
case NamedSize.Large:
- return 18;
+ return baseSize + (baseSizeSpan * 4);
default:
throw new ArgumentOutOfRangeException();
}
%define XF_VERSION 2.3.3.175
# Increase this XF_TIZEN_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed.
-%define XF_TIZEN_VERSION beta-004
+%define XF_TIZEN_VERSION beta-005
Name: xamarin-forms-tizen
Summary: Xamarin.Forms for Tizen platform