Disable recycling of native views

createNativeView will set iOS nativeView if it is null/undefined
This commit is contained in:
Hristo Hristov
2017-03-28 18:08:39 +03:00
parent 84e726e6b9
commit e6250e718a
59 changed files with 112 additions and 97 deletions

View File

@@ -107,21 +107,23 @@ const androidApp = new AndroidApplication();
exports.android = androidApp;
setApplication(androidApp);
let mainEntry: NavigationEntry;
let started = false;
export function start(entry?: NavigationEntry) {
export function start(entry?: NavigationEntry | string) {
if (started) {
throw new Error("Application is already started.");
}
started = true;
mainEntry = typeof entry === "string" ? { moduleName: entry } : entry;
if (!androidApp.nativeApp) {
const nativeApp = getNativeApplication();
androidApp.init(nativeApp);
}
}
started = true;
if (entry) {
exports.mainEntry = entry;
}
export function getMainEntry() {
return mainEntry;
}
export function getNativeApplication(): android.app.Application {