Question: ```
var delay=[1000,5000,2000,1000,1500] // (in milliseconds)
window.ChatTimer = $.timer(updateTimer, delay, true).once();
function updateTimer() {
// Do something
}

```

I want this jQuery timer to take the different delay every time, however it is taking the same delay each time it executes..... 
I am using jQuery Script file. U can find it below
<https://github.com/jchavannes/jquery-timer/blob/master/jquery.timer.js>

Answer: 
I have recently encounter the same problem, I was using `MasterDetailPage` in `Xamarin.Forms` and in android it does not set the title to center.

So, obvious route was to create a custom renderer and `override` its `OnLayout` method, and find Toolbar's `TextView` and set its `Gravity` to `Center`, easy right? 

But hey when i try to do this `myTextView.Gravity = Android.Views.GravityFlags.Center` it just doesn't work. I tried setting `ForegroundGravity` but no effect.

So finally i've calculated center X position and set `TextView` X position and VOILLA! it is now in center. Here is my solution.

```
[assembly: ExportRenderer(typeof(CustomMasterDetailPage), typeof(CustomMasterDetailPageRenderer))]
namespace myApp.Droid
{
    public class CustomMasterDetailPageRenderer : MasterDetailPageRenderer
    {
        protected override void OnLayout(bool changed, int l, int t, int r, int b)
        {
            base.OnLayout(changed, l, t, r, b);

            var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            for (int index = 0; index < toolbar.ChildCount; index++)
            {
                if (toolbar.GetChildAt(index) is TextView)
                {
                    var title = toolbar.GetChildAt(index) as TextView;
                    float toolbarCenter = toolbar.MeasuredWidth / 2;
                    float titleCenter = title.MeasuredWidth / 2;
                    title.SetX(toolbarCenter - titleCenter);
                }
            }
        }
    }
}

```
You'll need to create a custom renderer to achieve that. 

```
[assembly: ExportRenderer (typeof(NavigationPage), typeof(NavigationPageRenderer))]
namespace Droid
{

public class NavigationPageRenderer : NavigationRenderer
{

    protected override void OnElementChanged (ElementChangedEventArgs<NavigationPage> e)
    {
        base.OnElementChanged (e);

        ApplyTransparency ();
    }

    protected override bool DrawChild (Android.Graphics.Canvas canvas, Android.Views.View child, long drawingTime)
    {
        ApplyTransparency ();
        return base.DrawChild (canvas, child, drawingTime);
    }

    void ApplyTransparency ()
    {
        var activity = ((Activity)Context);
        var actionBar = activity.ActionBar;
        actionBar.SetIcon (Resource.Drawable.actionbaricon);
        actionBar.SetBackgroundDrawable (null);
    }
}
}

```

For me it only worked using both OnElementChanged and DrawChild calling RemoveAppIconFromActionBar otherwise, when you navigate to other pages it keeps adding the bar divider. 

You will also need to add `Window.RequestFeature (WindowFeatures.ActionBarOverlay);` to the MainActivity class.

If someone finds a better way to do this instead of using DrawChild() please let me know.

Hope it helps