在我的登錄頁面的應用程序中,我想在服務獲取數據之前用Xamarin表單中的消息「加載」加載圖像。 加載圖像,而服務獲取數據使用Xamarin形式
對於我這樣使用活動指示燈:
ActivityIndicator indicator = new ActivityIndicator { Color = Color.Blue, };
indicator.IsRunning = false;
indicator.IsVisible = false;
indicator.HorizontalOptions = LayoutOptions.CenterAndExpand;
indicator.VerticalOptions = LayoutOptions.CenterAndExpand;
,並點擊登錄按鈕後,我加了這樣的代碼
indicator.IsRunning = true;
indicator.IsVisible = true;
現在我只能在獲得加載圖片相同的screen.But我想像上面的image.can任何人都建議我解決這個問題。 在此先感謝
您可以將ActivityIndicator和圖像放在同一個位置,讓圖像在您準備好顯示全部圖像之前不可見。然後,使圖像可見時,您將使ActivityIndicator和Label不可見。 –
它們被放置在網格中嗎? –