/// <since_tizen> preview </since_tizen>
public static void Initialize()
{
- Interop.Elementary.elm_init(0, null);
+ if (!Window.IsPreloaded)
+ Interop.Elementary.elm_init(0, null);
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void ThemeOverlay()
{
- if (File.Exists(_themeFilePath))
+ if (!Window.IsPreloaded && File.Exists(_themeFilePath))
{
AddThemeOverlay(_themeFilePath);
}
s_precreated = this;
if (useBaseLayout)
InitializeBaseLayout();
+ WarmupWidgets();
+ BackButtonPressed += DummyHandler;
+ BackButtonPressed -= DummyHandler;
+ void DummyHandler(object sender, System.EventArgs e) { }
}
public Layout BaseLayout
conformant.SetContent(BaseLayout);
}
+ public void WarmupWidgets()
+ {
+ new Entry(this).Unrealize();
+ new Scroller(this).Unrealize();
+ new Box(this).Unrealize();
+ new Label(this).Unrealize();
+ new GenList(this).Unrealize();
+ new Button(this).Unrealize();
+ new Check(this).Unrealize();
+ new Naviframe(this).Unrealize();
+ new Slider(this).Unrealize();
+ new Spinner(this).Unrealize();
+ new ProgressBar(this).Unrealize();
+ new GestureLayer(this).Unrealize();
+ new Polygon(this).Unrealize();
+ new Image(this).Unrealize();
+ //TODO: Consider to call Image.LoadAsync()
+ }
+
public static PreloadedWindow GetInstance()
{
var instance = s_precreated;
}
}
+ internal static bool IsPreloaded { get; private set; }
+
/// <summary>
/// Creates a socket to provide the service for the Plug widget.
/// </summary>
Elementary.Initialize();
Elementary.ThemeOverlay();
_ = new PreloadedWindow();
+ IsPreloaded = true;
}
/// <summary>