Merge pull request #3334 from NativeScript/reexports

Fixed Android _onAttached logic. Fixes setting props in code-behind.
This commit is contained in:
Rossen Hristov
2016-12-20 16:16:11 +02:00
committed by GitHub
5 changed files with 19 additions and 15 deletions

View File

@ -11,7 +11,8 @@
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false, "emulator": false,
"rebuild": false, "rebuild": false,
"syncAllFiles": true "syncAllFiles": true,
"stopOnEntry": true
}, },
{ {
"name": "Launch on iOS", "name": "Launch on iOS",
@ -22,7 +23,8 @@
"sourceMaps": true, "sourceMaps": true,
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false, "emulator": false,
"rebuild": true "rebuild": true,
"stopOnEntry": true
}, },
{ {
"name": "Attach on iOS", "name": "Attach on iOS",
@ -32,7 +34,8 @@
"appRoot": "${workspaceRoot}", "appRoot": "${workspaceRoot}",
"sourceMaps": true, "sourceMaps": true,
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false "emulator": false,
"stopOnEntry": true
}, },
{ {
"name": "Sync on Android", "name": "Sync on Android",
@ -44,7 +47,8 @@
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false, "emulator": false,
"rebuild": false, "rebuild": false,
"syncAllFiles": true "syncAllFiles": true,
"stopOnEntry": true
}, },
{ {
"name": "Launch on Android", "name": "Launch on Android",
@ -55,7 +59,8 @@
"sourceMaps": true, "sourceMaps": true,
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false, "emulator": false,
"rebuild": true "rebuild": true,
"stopOnEntry": true
}, },
{ {
"name": "Attach on Android", "name": "Attach on Android",
@ -65,7 +70,8 @@
"appRoot": "${workspaceRoot}", "appRoot": "${workspaceRoot}",
"sourceMaps": true, "sourceMaps": true,
"diagnosticLogging": false, "diagnosticLogging": false,
"emulator": false "emulator": false,
"stopOnEntry": true
} }
] ]
} }

View File

@ -4,7 +4,6 @@ trace.enable();
trace.setCategories(trace.categories.concat( trace.setCategories(trace.categories.concat(
trace.categories.NativeLifecycle, trace.categories.NativeLifecycle,
trace.categories.Navigation, trace.categories.Navigation,
//trace.categories.Animation,
trace.categories.Transition trace.categories.Transition
)); ));
@ -69,7 +68,7 @@ application.on(application.lowMemoryEvent, function (args: application.Applicati
} }
}); });
application.on(application.uncaughtErrorEvent, function (args: application.ApplicationEventData) { application.on(application.uncaughtErrorEvent, function (args: application.UnhandledErrorEventData) {
if (args.android) { if (args.android) {
// For Android applications, args.android is NativeScriptError. // For Android applications, args.android is NativeScriptError.
console.log("### NativeScriptError: " + args.android); console.log("### NativeScriptError: " + args.android);

View File

@ -160,14 +160,12 @@ export class View extends ViewCommon {
} }
// copy all the locally cached values to the native android widget // copy all the locally cached values to the native android widget
applyNativeSetters(child);
return true; return true;
} }
this._eachChildView(eachChild); this._eachChildView(eachChild);
} else if (this._nativeView && !this.parent) {
// copy all the locally cached values to the native android widget
applyNativeSetters(this);
} }
applyNativeSetters(this);
} }
public _onDetached(force?: boolean) { public _onDetached(force?: boolean) {

View File

@ -58,7 +58,7 @@ export module ad {
_defaultBackgrounds.set(viewClass, nativeView.getBackground()); _defaultBackgrounds.set(viewClass, nativeView.getBackground());
} }
backgroundDrawable = new org.nativescript.widgets.BorderDrawable(v.toString()); backgroundDrawable = new org.nativescript.widgets.BorderDrawable(1, v.toString());
refreshBorderDrawable(v, <org.nativescript.widgets.BorderDrawable>backgroundDrawable); refreshBorderDrawable(v, <org.nativescript.widgets.BorderDrawable>backgroundDrawable);
if (getSDK() >= 16) { if (getSDK() >= 16) {

View File

@ -46,7 +46,8 @@
} }
export class BorderDrawable extends android.graphics.drawable.ColorDrawable { export class BorderDrawable extends android.graphics.drawable.ColorDrawable {
constructor(id: string); constructor(density: number);
constructor(density: number, id: string);
public refresh( public refresh(
borderTopColor: number, borderTopColor: number,