Skip to content Skip to sidebar Skip to footer

Label Doesn't Update On Older System Version - Xamarin

I have issue. Label doesn't update on older version. On android system version 8.1 everything is ok but for instance on 7.1 version refreshing label doesn't work. private void

Solution 1:

Assuming your timer callback is not on the UI thread:

private void OnTimedEvent(object sender, System.Timers.ElapsedEventArgs e)
{
    RunOnUiThread(() =>
    {
        var lab_seconds = FindViewById<TextView>(Resource.Id.textView_seconds);
        lab_seconds.Text = (Int32.Parse(lab_seconds.Text) -1).ToString();
     });
}

Post a Comment for "Label Doesn't Update On Older System Version - Xamarin"