public void OnDownloadStateChanged(DownloaderState newState) { if (this.downloaderState != newState) { this.downloaderState = newState; this.statusTextView.Text = Helpers.GetDownloaderStringFromState(newState); } if (newState != DownloaderState.Completed) { this.dashboardView.Visibility = newState.CanShowProgress() ? ViewStates.Visible : ViewStates.Gone; this.useCellDataView.Visibility = newState.IsWaitingForCellApproval() ? ViewStates.Visible : ViewStates.Gone; this.progressBar.Indeterminate = newState.IsIndeterminate(); this.UpdatePauseButton(newState.IsPaused()); } }
public void OnDownloadStateChanged(DownloaderState newState) { if (this.downloaderState != newState) { this.downloaderState = newState; RunOnUiThread(() => { _progressDialog.SetMessage(GetDownloaderStringFromState(newState)); }); } if (newState != DownloaderState.Completed) { _progressDialog.Indeterminate = newState.IsIndeterminate(); } else { _progressDialog.SetMessage(GetString(Resource.String.apkDown_completed)); CheckDownloadedFile(); } }
public void OnDownloadStateChanged(DownloaderState newState) { if (this.downloaderState != newState) { this.downloaderState = newState; this.statusTextView.Text = this.GetString(Helpers.GetDownloaderStringFromState(newState)); } if (newState != DownloaderState.Completed) { this.dashboardView.Visibility = newState.CanShowProgress() ? ViewStates.Visible : ViewStates.Gone; this.useCellDataView.Visibility = newState.IsWaitingForCellApproval() ? ViewStates.Visible : ViewStates.Gone; this.progressBar.Indeterminate = newState.IsIndeterminate(); this.UpdatePauseButton(newState.IsPaused()); } }