summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-09-14 23:32:23 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:41 (GMT)
commitaa647ac6e5d8bade8f752ddbb664c3a817487e66 (patch)
tree6a888956f4782344f048d24eb8dd4abfd8be8d72
parentd8aea7285184fa1cb5e69d9150d480983af4ca29 (diff)
downloadxamarin-forms-aa647ac6e5d8bade8f752ddbb664c3a817487e66.zip
xamarin-forms-aa647ac6e5d8bade8f752ddbb664c3a817487e66.tar.gz
xamarin-forms-aa647ac6e5d8bade8f752ddbb664c3a817487e66.tar.bz2
Fix wearable profile detection condition
- Considering common (iot) profile, TargetIdiom.Unsupported couldn't be used only for wearable. - Before TargetIdiom.Watch availabie from Xamarin.Forms.Core, we'd like to use elementary's profile to verify whether current profile is wearable or not. Change-Id: I01a93d8d5a5831dbeb7da6d2d1c441ea08073aed
-rw-r--r--Xamarin.Forms.Platform.Tizen/Forms.cs9
-rw-r--r--[-rwxr-xr-x]Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs4
-rw-r--r--[-rwxr-xr-x]Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs4
3 files changed, 13 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Forms.cs b/Xamarin.Forms.Platform.Tizen/Forms.cs
index 85b37ae..83c5173 100644
--- a/Xamarin.Forms.Platform.Tizen/Forms.cs
+++ b/Xamarin.Forms.Platform.Tizen/Forms.cs
@@ -298,6 +298,15 @@ namespace Xamarin.Forms.Platform.Tizen
{
return eflPt / s_elmScale.Value;
}
+
+ /// <summary>
+ /// Get the EFL's profile
+ /// </summary>
+ /// <returns></returns>
+ internal static string GetProfile()
+ {
+ return s_profile.Value;
+ }
}
class TizenExpressionSearch : ExpressionVisitor, IExpressionSearch
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
index 4b3b699..e2611ea 100755..100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
@@ -55,8 +55,8 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
- ///TODO: If 'WATCH' target idiom is added. must be replaced 'Unsupported' to 'TargetIdiom.WATCH'.
- if (Device.Idiom == TargetIdiom.Unsupported)
+ ///TODO: If 'Watch' target idiom is added, it should be replaced something like Device.Idiom == TargetIdiom.Watch.
+ if (Forms.GetProfile() == "wearable")
{
SetNativeControl(new Native.CircleListView(Forms.Context.MainWindow));
}
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
index 6c13ea3..96fb7d9 100755..100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
@@ -28,8 +28,8 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
- ///TODO: If 'WATCH' target idiom is added. must be replaced 'Unsupported' to 'TargetIdiom.WATCH'.
- if (Device.Idiom == TargetIdiom.Unsupported)
+ ///TODO: If 'Watch' target idiom is added, it should be replaced something like Device.Idiom == TargetIdiom.Watch.
+ if (Forms.GetProfile() == "wearable" )
{
SetNativeControl(new CircleScroller(Forms.Context.MainWindow));
}