summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongkyun <jk.pu@samsung.com>2017-08-02 01:08:08 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:41 (GMT)
commitff7a5d2cd3a0fb301e56a7b42108830815141ef2 (patch)
treef8b2771b6fe6b3f76d464bbfa81dcd663424296a
parentd7f6fc894a6837fd032b76d9aa38b7a7b2a02c17 (diff)
downloadxamarin-forms-ff7a5d2cd3a0fb301e56a7b42108830815141ef2.zip
xamarin-forms-ff7a5d2cd3a0fb301e56a7b42108830815141ef2.tar.gz
xamarin-forms-ff7a5d2cd3a0fb301e56a7b42108830815141ef2.tar.bz2
add Circle Native controll for wearable profile
set CircleScroller and CircleListView control when profile is wearable. Change-Id: I5e133e2d6d5797db16c3fef75edd10ce2867a839 Signed-off-by: Jeongkyun <jk.pu@samsung.com>
-rw-r--r--.nuspec/Xamarin.Forms.Maps.Tizen.nuspec2
-rw-r--r--.nuspec/Xamarin.Forms.Platform.Tizen.nuspec2
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Maps.Tizen/project.json2
-rwxr-xr-xXamarin.Forms.Platform.Tizen/Native/CircleListView.cs20
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs11
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs11
-rwxr-xr-x[-rw-r--r--]Xamarin.Forms.Platform.Tizen/project.json2
7 files changed, 44 insertions, 6 deletions
diff --git a/.nuspec/Xamarin.Forms.Maps.Tizen.nuspec b/.nuspec/Xamarin.Forms.Maps.Tizen.nuspec
index eeec43b..254bcb5 100644
--- a/.nuspec/Xamarin.Forms.Maps.Tizen.nuspec
+++ b/.nuspec/Xamarin.Forms.Maps.Tizen.nuspec
@@ -14,7 +14,7 @@
<copyright>Copyright 2013-2017</copyright>
<dependencies>
<dependency id="Xamarin.Forms.Maps" version="2.4.0.256-pre1" />
- <dependency id="Tizen.NET" version="4.0.0-preview1-00100" />
+ <dependency id="Tizen.NET" version="4.0.0-preview1-00117" />
</dependencies>
</metadata>
<files>
diff --git a/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec b/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
index d0b34da..75ea1d1 100644
--- a/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
+++ b/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
@@ -14,7 +14,7 @@
<copyright>Copyright 2013-2017</copyright>
<dependencies>
<dependency id="Xamarin.Forms" version="2.4.0.266-pre1" />
- <dependency id="Tizen.NET" version="4.0.0-preview1-00100" />
+ <dependency id="Tizen.NET" version="4.0.0-preview1-00117" />
</dependencies>
</metadata>
<files>
diff --git a/Xamarin.Forms.Maps.Tizen/project.json b/Xamarin.Forms.Maps.Tizen/project.json
index f24883e..94f64b3 100644..100755
--- a/Xamarin.Forms.Maps.Tizen/project.json
+++ b/Xamarin.Forms.Maps.Tizen/project.json
@@ -1,7 +1,7 @@
´╗┐{
"dependencies": {
"NETStandard.Library": "1.6.1",
- "Tizen.NET": "4.0.0-preview1-00100"
+ "Tizen.NET": "4.0.0-preview1-00117"
},
"frameworks": {
"netstandard1.6": {
diff --git a/Xamarin.Forms.Platform.Tizen/Native/CircleListView.cs b/Xamarin.Forms.Platform.Tizen/Native/CircleListView.cs
new file mode 100755
index 0000000..231896a
--- /dev/null
+++ b/Xamarin.Forms.Platform.Tizen/Native/CircleListView.cs
@@ -0,0 +1,20 @@
+using System;
+using ElmSharp;
+using ElmSharp.Wearable;
+
+namespace Xamarin.Forms.Platform.Tizen.Native
+{
+ public class CircleListView : ListView
+ {
+ CircleGenList _circleGenList;
+
+ public CircleListView(EvasObject parent) : base(parent) { }
+
+ protected override IntPtr CreateHandle(EvasObject parent)
+ {
+ _circleGenList = new CircleGenList(parent);
+ RealHandle = _circleGenList.RealHandle;
+ return _circleGenList;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
index 9e42c99..4b3b699 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ListViewRenderer.cs
@@ -55,7 +55,16 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
- SetNativeControl(new Native.ListView(Forms.Context.MainWindow));
+ ///TODO: If 'WATCH' target idiom is added. must be replaced 'Unsupported' to 'TargetIdiom.WATCH'.
+ if (Device.Idiom == TargetIdiom.Unsupported)
+ {
+ SetNativeControl(new Native.CircleListView(Forms.Context.MainWindow));
+ }
+ else
+ {
+ SetNativeControl(new Native.ListView(Forms.Context.MainWindow));
+ }
+
Control.ItemSelected += OnListViewItemSelected;
Control.ItemUnselected += OnListViewItemUnselected;
}
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
index 0168d2d..6c13ea3 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
@@ -1,6 +1,7 @@
´╗┐using System;
using System.ComponentModel;
using ElmSharp;
+using ElmSharp.Wearable;
namespace Xamarin.Forms.Platform.Tizen
{
@@ -27,7 +28,15 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
- SetNativeControl(new Scroller(Forms.Context.MainWindow));
+ ///TODO: If 'WATCH' target idiom is added. must be replaced 'Unsupported' to 'TargetIdiom.WATCH'.
+ if (Device.Idiom == TargetIdiom.Unsupported)
+ {
+ SetNativeControl(new CircleScroller(Forms.Context.MainWindow));
+ }
+ else
+ {
+ SetNativeControl(new Scroller(Forms.Context.MainWindow));
+ }
Control.Scrolled += OnScrolled;
}
diff --git a/Xamarin.Forms.Platform.Tizen/project.json b/Xamarin.Forms.Platform.Tizen/project.json
index f309b33..b77fb17 100644..100755
--- a/Xamarin.Forms.Platform.Tizen/project.json
+++ b/Xamarin.Forms.Platform.Tizen/project.json
@@ -2,7 +2,7 @@
"dependencies": {
"NETStandard.Library": "1.6.1",
"System.Runtime.Serialization.Xml": "4.3.0",
- "Tizen.NET": "4.0.0-preview1-00100"
+ "Tizen.NET": "4.0.0-preview1-00117"
},
"frameworks": {
"netstandard1.6": {