public SplashScreenPage(SyncFusionService syncFusionService) { _syncFusionService = syncFusionService; _gitTrendsImage = new Image { Source = "GitTrends", Opacity = 0, HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand, }; _statusLabel = new Label { Text = "Initializing", HorizontalTextAlignment = TextAlignment.Center, TranslationX = DeviceDisplay.MainDisplayInfo.Width / 2, }; if (Device.RuntimePlatform is Device.Android) { _gitTrendsImage.WidthRequest = 250; _gitTrendsImage.HeightRequest = 190; } var relativeLayout = new RelativeLayout(); relativeLayout.Children.Add(_gitTrendsImage, Constraint.RelativeToParent(parent => parent.Width / 2 - getWidth(parent, _gitTrendsImage) / 2), Constraint.RelativeToParent(parent => parent.Height / 2 - getHeight(parent, _gitTrendsImage) / 2)); relativeLayout.Children.Add(_statusLabel, Constraint.RelativeToParent(parent => parent.Width / 2 - getWidth(parent, _statusLabel) / 2), Constraint.RelativeToView(_gitTrendsImage, (parent, view) => view.Y + getHeight(parent, _gitTrendsImage) + 20)); Content = relativeLayout;
public SplashScreenViewModel(SyncFusionService syncfusionService, MediaElementService mediaElementService, AnalyticsService analyticsService, NotificationService notificationService) : base(analyticsService) { InitializeAppCommand = new AsyncCommand(() => ExecuteInitializeAppCommand(syncfusionService, mediaElementService, notificationService)); }
public SplashScreenViewModel(SyncFusionService syncfusionService, AnalyticsService analyticsService) : base(analyticsService) { _syncFusionService = syncfusionService; InitializeAppCommand = new AsyncCommand(ExecuteInitializeAppCommand); }