mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
Fix android orientation exception. (#2278)
Fix android activity destroy/resume. Fix tslint - skipped all from node_modules & platforms
This commit is contained in:
@ -166,7 +166,8 @@ module.exports = function(grunt) {
|
||||
"!tns-core-modules/ios.d.ts",
|
||||
"!tns-core-modules/android17.d.ts",
|
||||
"!tns-core-modules/libjs.d.ts",
|
||||
"!tests/node_modules/"
|
||||
"!tests/node_modules/**",
|
||||
"!tests/platforms/**"
|
||||
]);
|
||||
localCfg.srcTsdFiles = [
|
||||
"**/*.d.ts",
|
||||
|
@ -3,6 +3,8 @@ import definition = require("application");
|
||||
import frame = require("ui/frame");
|
||||
import observable = require("data/observable");
|
||||
import * as typesModule from "utils/types";
|
||||
import * as enumsModule from "ui/enums";
|
||||
let enums: typeof enumsModule;
|
||||
|
||||
global.moduleMerge(appModule, exports);
|
||||
var typedExports: typeof definition = exports;
|
||||
@ -137,12 +139,14 @@ function initComponentCallbacks() {
|
||||
return;
|
||||
}
|
||||
|
||||
currentOrientation = newOrientation;
|
||||
if (!enums) {
|
||||
enums = require("ui/enums");
|
||||
}
|
||||
|
||||
let enums = require("ui/enums");
|
||||
currentOrientation = newOrientation;
|
||||
let newValue;
|
||||
|
||||
switch (orientation) {
|
||||
switch (newOrientation) {
|
||||
case android.content.res.Configuration.ORIENTATION_LANDSCAPE:
|
||||
newValue = enums.DeviceOrientation.landscape;
|
||||
break;
|
||||
|
@ -717,8 +717,6 @@ class FragmentClass extends android.app.Fragment {
|
||||
trace.write(`${this}.onDestroy()`, trace.categories.NativeLifecycle);
|
||||
}
|
||||
super.onDestroy();
|
||||
|
||||
this.entry.fragmentTag = undefined;
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
|
Reference in New Issue
Block a user