From: 유리나/Common Platform Lab(SR)/Staff Engineer/삼성전자 Date: Thu, 2 Apr 2020 01:52:40 +0000 (+0900) Subject: Fixed the black screen before LoadingPage appears (#184) X-Git-Tag: submit/tizen_5.5/20200420.234045~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=200c7f32fcbcd84934b1fc8e17d93b22cefda6ac;p=platform%2Fcore%2Fcsapi%2Fxsf.git Fixed the black screen before LoadingPage appears (#184) --- diff --git a/test/UnderArmour/MapMyRun/MapMyRun.Tizen/App.xaml.cs b/test/UnderArmour/MapMyRun/MapMyRun.Tizen/App.xaml.cs index 4deca375..cd3f480e 100755 --- a/test/UnderArmour/MapMyRun/MapMyRun.Tizen/App.xaml.cs +++ b/test/UnderArmour/MapMyRun/MapMyRun.Tizen/App.xaml.cs @@ -17,17 +17,12 @@ namespace MapMyRun.Tizen [XamlCompilation(XamlCompilationOptions.Compile)] public partial class App : Application { - //private const string ServiceAppId = "org.tizen.example.MapMyRunService"; - private const string ServiceAppId = "org.tizen.mapmyrunservice"; public Workout workout; public SettingManager settingManager; public App() { InitializeComponent(); - var dispatcher = MapMyRun.Models.Dispatcher.Instance; - settingManager = new SettingManager(dispatcher); - workout = new Workout(dispatcher, new PermissionManager(dispatcher)); - MainPage = new LoadingPage(); ; + MainPage = new LoadingPage(); } protected override void OnStart() diff --git a/test/UnderArmour/MapMyRun/MapMyRun.Tizen/views/LoadingPage.xaml.cs b/test/UnderArmour/MapMyRun/MapMyRun.Tizen/views/LoadingPage.xaml.cs index 4ac8d816..1f9278b6 100755 --- a/test/UnderArmour/MapMyRun/MapMyRun.Tizen/views/LoadingPage.xaml.cs +++ b/test/UnderArmour/MapMyRun/MapMyRun.Tizen/views/LoadingPage.xaml.cs @@ -10,33 +10,38 @@ using Tizen.Wearable.CircularUI.Forms; using MapMyRun.Tizen.ViewModels; using MapMyRun.Tizen.Models; using MapMyRun.Models; +using MapMyRun.Models.Workout; +using MapMyRun.Models.Settings; namespace MapMyRun.Tizen.Views { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class LoadingPage : CirclePage { - private readonly Loading _loading; - private const string ServiceAppId = "org.tizen.mapmyrunservice"; + private Loading _loading; + //private const string ServiceAppId = "org.tizen.example.MapMyRunService"; + private const string ServiceAppId = "org.tizen.mapmyrunservice"; public static readonly BindableProperty ProgressProperty = BindableProperty.Create("Progress", typeof(double), typeof(CircleProgressBarSurfaceItem), propertyChanged: (b, o, n) => ProgressBarProgressChanged((CircleProgressBarSurfaceItem)b, (double)n)); - public LoadingPage() { InitializeComponent(); ProgressBar.SetBinding(ProgressProperty, "Progress"); - var dispatcher = MapMyRun.Models.Dispatcher.Instance; - _loading = new Loading(new AppLauncher(), new MessagePortHandler(), - dispatcher, new PhoneService(dispatcher, new TizenPlatformService()), ((App)Application.Current).settingManager, ServiceAppId); - - BindingContext = new LoadingPageModel(_loading); Appearing += (s, e) => { + var dispatcher = MapMyRun.Models.Dispatcher.Instance; + + ((App)Application.Current).settingManager = new SettingManager(dispatcher); + ((App)Application.Current).workout = new Workout(dispatcher, new PermissionManager(dispatcher)); + + _loading = new Loading(new AppLauncher(), new MessagePortHandler(), + dispatcher, new PhoneService(dispatcher, new TizenPlatformService()), ((App)Application.Current).settingManager, ServiceAppId); + BindingContext = new LoadingPageModel(_loading); _loading.StartLoading(); (Application.Current as App).workout.StartListenWorkoutData(); };