2
我在Xamarin共享應用程序中創建歡迎屏幕。歡迎屏幕必須顯示圖像幾秒鐘然後導航到登錄頁面。它完美地工作在IOS中,但不在Android中顯示圖像。Xamarin.Forms Shared不是在Android視圖中顯示圖像,而是在iOS視圖中顯示圖像
public Page()
{
//var beachImage = new Image { Aspect = Aspect.AspectFit };
//beachImage.Source = ImageSource.FromFile("nextera.png");
Image logo = new Image { WidthRequest = 800, HeightRequest = 800 };
logo.Source = ImageSource.FromFile("nextera.png");
logo.Aspect = Aspect.AspectFit;
Content = new StackLayout
{
Children = { logo },
Padding = new Thickness(0, 20, 0, 0),
VerticalOptions = LayoutOptions.StartAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand
};
WaitAndExecute(2000);
}
private async Task WaitAndExecute(int milisec)
{
await Task.Delay(milisec);
await Navigation.PushAsync(new Login());
}
感謝您的回覆 – Vivekh 2015-03-26 09:51:33
當然。 您是否設法使用這些操作顯示圖像? – IdoT 2015-03-26 14:30:43
是的,但是您提供的鏈接中的代碼 – Vivekh 2015-03-26 15:36:30