xamarin.formsでactivityindicatorを使用したいと思いますが、Activityindicatorは画面の中央で正常に表示されますが、回転するアニメーションは停止しており、一部の記事は消えていますが、 helped.Iは、他のデバイスでテストしていませんが、あなたはそれのために構築されていない何かをachiveしようcodes-ActivityindicatorはXamarin.formsで回転を停止します
private async Task<string> getUrlString(string id)
{
string url = doSomeWork(id);\\its a long running process where it \\takes around 10 minutes to run,And I cant do it in background for some reasons
return url;
}
async void Handle_ItemSelected(object sender, Xamarin.Forms.SelectedItemChangedEventArgs e)
{
await DisplayAlert("", "something", "OK");
activityindicator.IsRunning = true;
await Task.Delay(250); int id=1;
var url =await getUrlString(id);
await Navigation.PushModalAsync(new playerPage());
activityindicator.IsRunning = false;
}
あなたのタスクがMainThreadで「何らかの理由で」実行され、スピナーが停止する理由を説明できる場合... –
ありがとう返答する、はい、メインスレッドで実行する、私はスピン停止理由を知っている、ちょうど適切な解決策を探す –