我已經創建了一個活動指示器並將其添加到StackLayout中,當它運行時,它將顯示在右上角的Android 4.4中,iOS中沒有顯示,並且在Android 6手機中顯示不顯示。如何在屏幕中間顯示ActivityIndicator?
var indicator = new ActivityIndicator()
{
Color = Color.Blue,
};
indicator.SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy", BindingMode.OneWay);
indicator.SetBinding(ActivityIndicator.IsRunningProperty, "IsBusy", BindingMode.OneWay);
AbsoluteLayout.SetLayoutFlags(indicator, AbsoluteLayoutFlags.PositionProportional);
AbsoluteLayout.SetLayoutBounds(indicator, new Rectangle(0.5, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
mainLayout.Children.Add(indicator);
我想將活動指示器顯示在屏幕中央,因爲操作需要時間才能完成。