I am creating welcome screen in Xamarin shared application.Welcome screen has to show the image few seconds then navigate to login page.It is perfectly working in IOS, but not displaying image in Android.
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());
}