//------------------------------------------------------------------------------
        void UpdateStatusText(FetchStatus status)
        {
            InvokeOnMainThread(() =>
            {
                switch (status)
                {
                case FetchStatus.Success:
                    m_FetchStatus.Text = "Fetch status - Success";
                    break;

                case FetchStatus.Throttled:
                    m_FetchStatus.Text = "Fetch status - Throttled";
                    break;

                case FetchStatus.NoFetchYet:
                    m_FetchStatus.Text = "Status - NoFetchYet";
                    break;

                case FetchStatus.Failure:
                    m_FetchStatus.Text = "Fetch status - Failure";
                    break;

                default:
                    m_FetchStatus.Text = "Fetch status - Unknown status code";
                    break;
                }
            });
        }
        //------------------------------------------------------------------------------
        void UpdateStatusText(FetchStatus status)
        {
            RunOnUiThread(() =>
            {
                TextView statusTextView = FindViewById <TextView>(Resource.Id.status);

                switch (status)
                {
                case FetchStatus.Success:
                    statusTextView.Text = "Fetch status - Success";
                    break;

                case FetchStatus.Throttled:
                    statusTextView.Text = "Fetch status - Throttled";
                    break;

                case FetchStatus.NoFetchYet:
                    statusTextView.Text = "Fetch status - NoFetchYet";
                    break;

                case FetchStatus.Failure:
                    statusTextView.Text = "Fetch status - Failure";
                    break;

                default:
                    statusTextView.Text = "Fetch status - Unknown status code";
                    break;
                }
            });
        }
        //------------------------------------------------------------------------------
        void CompletionHandler(FetchStatus status)
        {
            switch (status)
            {
            case FetchStatus.Success:
                UpdateUI();
                break;

            case FetchStatus.Throttled:
                break;

            case FetchStatus.NoFetchYet:
                break;

            case FetchStatus.Failure:
                break;
            }

            UpdateStatusText(status);
        }
Beispiel #4
0
 public string GetFetchStatusText()
 {
     return(FetchStatus.ToString());
 }