summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-02-03 06:21:16 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-02-03 06:21:16 (GMT)
commitb4bd94fdd7c3be60a36e6965016d2a6ab3e01ef5 (patch)
tree9aa3dec26db0bf4e03ebaebad44d6b9fbf34440d
parent472d78754ece92cca55f3a4e4cf573a653b251db (diff)
downloadxamarin-forms-b4bd94fdd7c3be60a36e6965016d2a6ab3e01ef5.zip
xamarin-forms-b4bd94fdd7c3be60a36e6965016d2a6ab3e01ef5.tar.gz
xamarin-forms-b4bd94fdd7c3be60a36e6965016d2a6ab3e01ef5.tar.bz2
Rebase Forms to upstream lastest (2.3.4-pre2)
- Synced with 3c7b291. (https://github.com/xamarin/Xamarin.Forms/commit/3c7b2918b3065a81ecb4040fde09d93aae09f62d) - [Core] Device.Tizen has been added newly. - Package version has updated to 2.3.4-r190-001 Change-Id: I948fd73212744aa8c1941dc6a6d8e46eb29523af
-rw-r--r--[-rwxr-xr-x]Xamarin.Forms.Core/Device.cs3
-rw-r--r--Xamarin.Forms.Platform.Tizen/Forms.cs8
-rw-r--r--Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs58
-rw-r--r--packaging/xamarin-forms-tizen.spec6
4 files changed, 20 insertions, 55 deletions
diff --git a/Xamarin.Forms.Core/Device.cs b/Xamarin.Forms.Core/Device.cs
index cbc44f2..2987ea5 100755..100644
--- a/Xamarin.Forms.Core/Device.cs
+++ b/Xamarin.Forms.Core/Device.cs
@@ -13,6 +13,7 @@ namespace Xamarin.Forms
public const string WinPhone = "WinPhone";
public const string Windows = "Windows";
public const string macOS = "macOS";
+ public const string Tizen = "Tizen";
internal static DeviceInfo info;
@@ -179,4 +180,4 @@ namespace Xamarin.Forms
public static readonly Style CaptionStyle = new Style(typeof(Label)) { BaseResourceKey = CaptionStyleKey };
}
}
-} \ No newline at end of file
+}
diff --git a/Xamarin.Forms.Platform.Tizen/Forms.cs b/Xamarin.Forms.Platform.Tizen/Forms.cs
index 5191425..892faf5 100644
--- a/Xamarin.Forms.Platform.Tizen/Forms.cs
+++ b/Xamarin.Forms.Platform.Tizen/Forms.cs
@@ -136,8 +136,6 @@ namespace Xamarin.Forms.Platform.Tizen
Elementary.ThemeOverlay();
}
- Device.OS = TargetPlatform.Tizen;
-
// In .NETCore, AppDomain feature is not supported.
// The list of assemblies returned by AppDomain.GetAssemblies() method should be registered manually.
// The assembly of the executing application and referenced assemblies of it are added into the list here.
@@ -184,7 +182,11 @@ namespace Xamarin.Forms.Platform.Tizen
{
Device.Idiom = TargetIdiom.Phone;
}
- else if (profile == "tv" || profile == "desktop")
+ else if (profile == "tv")
+ {
+ Device.Idiom = TargetIdiom.TV;
+ }
+ else if ( profile == "desktop")
{
Device.Idiom = TargetIdiom.Desktop;
}
diff --git a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
index 3fa4e75..f3a72d0 100644
--- a/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
+++ b/Xamarin.Forms.Platform.Tizen/TizenPlatformServices.cs
@@ -6,6 +6,7 @@ using System.Security.Cryptography;
using System.Threading;
using System.Threading.Tasks;
using System.Net.Http;
+using Xamarin.Forms.Internals;
using ElmSharp;
namespace Xamarin.Forms.Platform.Tizen
@@ -21,42 +22,13 @@ namespace Xamarin.Forms.Platform.Tizen
s_context = SynchronizationContext.Current;
}
- public class _Timer : ITimer
+ public class TizenTicker : Ticker
{
- readonly Timer timer;
+ readonly Timer _timer;
- public _Timer(Timer timer)
+ public TizenTicker()
{
- this.timer = timer;
- }
-
- #region ITimer implementation
- public void Change(int dueTime, int period)
- {
- timer.Change(dueTime, period);
- }
- public void Change(long dueTime, long period)
- {
- timer.Change((int)dueTime, (int)period);
- }
- public void Change(TimeSpan dueTime, TimeSpan period)
- {
- timer.Change(dueTime, period);
- }
- public void Change(uint dueTime, uint period)
- {
- timer.Change((int)dueTime, (int)period);
- }
- #endregion
- }
-
- public class Ticker : Xamarin.Forms.Internals.Ticker
- {
- readonly ITimer _timer;
-
- public Ticker()
- {
- _timer = new _Timer(new Timer((object o) => HandleElapsed(o), this, Timeout.Infinite, Timeout.Infinite));
+ _timer = new Timer((object o) => HandleElapsed(o), this, Timeout.Infinite, Timeout.Infinite);
}
protected override void EnableTimer()
@@ -74,7 +46,6 @@ namespace Xamarin.Forms.Platform.Tizen
s_context.Post((o) => SendSignals(-1), null);
}
}
-
#region IPlatformServices implementation
public double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes)
@@ -82,9 +53,8 @@ namespace Xamarin.Forms.Platform.Tizen
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)
+ if (Device.Idiom == TargetIdiom.TV)
{
// TODO: These valuse should be updated when TV profile UX guideline released.
baseSize = 60;
@@ -124,9 +94,9 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
- public Xamarin.Forms.Internals.Ticker CreateTicker()
+ public Ticker CreateTicker()
{
- return new Ticker();
+ return new TizenTicker();
}
public void StartTimer(TimeSpan interval, Func<bool> callback)
@@ -166,16 +136,6 @@ namespace Xamarin.Forms.Platform.Tizen
return AppDomain.CurrentDomain.GetAssemblies();
}
- public ITimer CreateTimer(Action<object> callback, object state, int dueTime, int period)
- {
- return new _Timer(new Timer((object o) => callback(o), state, dueTime, period));
- }
-
- public ITimer CreateTimer(Action<object> callback, object state, TimeSpan dueTime, TimeSpan period)
- {
- return new _Timer(new Timer((object o) => callback(o), state, dueTime, period));
- }
-
public IIsolatedStorageFile GetUserStoreForApplication()
{
return new TizenIsolatedStorageFile();
@@ -202,6 +162,8 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
+ public string RuntimePlatform => Device.Tizen;
+
#endregion
// In .NETCore, AppDomain is not supported. The list of the assemblies should be generated manually.
diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec
index 968fd92..0510a4b 100644
--- a/packaging/xamarin-forms-tizen.spec
+++ b/packaging/xamarin-forms-tizen.spec
@@ -1,7 +1,7 @@
-%define XF_VERSION 2.3.3.175
+%define XF_VERSION 2.3.4
# Increase this XF_TIZEN_VERSION when any public APIs of Xamarin.Forms.Platform.Tizen are changed.
-%define XF_TIZEN_VERSION beta-007
+%define XF_TIZEN_VERSION r190-001
Name: xamarin-forms-tizen
Summary: Xamarin.Forms for Tizen platform
@@ -12,7 +12,7 @@ Group: Graphics & UI Framework/Libraries
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
-%define NUPKG_VERSION %{XF_VERSION}%{?XF_PRETAG:-%{XF_PRETAG}}-%{XF_TIZEN_VERSION}
+%define NUPKG_VERSION %{XF_VERSION}-%{XF_TIZEN_VERSION}
AutoReqProv: no
ExcludeArch: aarch64