diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-04-25 13:57:44 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-04-25 15:57:44 -0400 |
commit | 843bc4727a40d6ca67127326facf2333f461da2d (patch) | |
tree | 5467ab3850df7f2368baa1290e983adba27f35d9 /Xamarin.Forms.Platform.Android | |
parent | 07df05ced2b43446c84d47f4b7a8325abcd0f767 (diff) | |
download | xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.tar.gz xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.tar.bz2 xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.zip |
Make core Ticker abstract and public (#116)
* Make core Ticker abstract and public
Make the core Ticker abstract and public so it can be inherited by platform
implementations; remove now-unused parts of original Ticker; add CreateTicker
to IPlatformServices; remove unused CreateTimer methods from IPlatformServices
* Add docs for Ticker
* Remove unnecessary Ticker.Default set
* Move Ticker into Internals
* Update Ticker docs
* Remove old Ticker docs
* Remove commented code
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/AndroidTicker.cs | 1 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.Android/Forms.cs | 25 |
2 files changed, 4 insertions, 22 deletions
diff --git a/Xamarin.Forms.Platform.Android/AndroidTicker.cs b/Xamarin.Forms.Platform.Android/AndroidTicker.cs index 2f5104e3..4a52ad87 100644 --- a/Xamarin.Forms.Platform.Android/AndroidTicker.cs +++ b/Xamarin.Forms.Platform.Android/AndroidTicker.cs @@ -1,5 +1,6 @@ using System; using Android.Animation; +using Xamarin.Forms.Internals; namespace Xamarin.Forms.Platform.Android { diff --git a/Xamarin.Forms.Platform.Android/Forms.cs b/Xamarin.Forms.Platform.Android/Forms.cs index e85adafe..2699241f 100644 --- a/Xamarin.Forms.Platform.Android/Forms.cs +++ b/Xamarin.Forms.Platform.Android/Forms.cs @@ -15,6 +15,7 @@ using Android.Content; using Android.Content.Res; using Android.OS; using Android.Util; +using Xamarin.Forms.Internals; using Xamarin.Forms.Platform.Android; using Resource = Android.Resource; using Trace = System.Diagnostics.Trace; @@ -247,29 +248,9 @@ namespace Xamarin.Forms activity.RunOnUiThread(action); } - public ITimer CreateTimer(Action<object> callback) + public Ticker CreateTicker() { - return new _Timer(new Timer(o => callback(o))); - } - - public ITimer CreateTimer(Action<object> callback, object state, int dueTime, int period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, long dueTime, long period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, TimeSpan dueTime, TimeSpan period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, uint dueTime, uint period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); + return new AndroidTicker(); } public Assembly[] GetAssemblies() |