Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit dc38afc

Browse files
committed
refactor(demos): minor tweaks
1 parent b31b5f0 commit dc38afc

File tree

6 files changed

+7
-31
lines changed

6 files changed

+7
-31
lines changed

Diff for: demo/AngularApp/app/application.android.ts

-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
// the `JavaProxy` decorator specifies the package and the name for the native *.JAVA file generated.
21
@JavaProxy("org.myApp.Application")
32
class Application extends android.app.Application {
43
onCreate(): void {
54
super.onCreate();
6-
7-
// At this point modules have already been initialized
8-
9-
// Enter custom initialization code here
105
}
116

127
protected attachBaseContext(baseContext: android.content.Context) {
138
super.attachBaseContext(baseContext);
14-
15-
// This code enables MultiDex support for the application (if needed)
16-
// android.support.multidex.MultiDex.install(this);
179
}
1810
}

Diff for: demo/JavaScriptApp/app/activity.android.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
let frame = require("ui/frame");
1+
const frame = require("ui/frame");
22

3-
let superProto = android.app.Activity.prototype;
4-
let Activity = android.app.Activity.extend("org.myApp.MainActivity", {
3+
const superProto = android.app.Activity.prototype;
4+
const Activity = android.app.Activity.extend("org.myApp.MainActivity", {
55
onCreate: function(savedInstanceState) {
66
if(!this._callbacks) {
77
frame.setActivityCallbacks(this);
88
}
9-
// Modules will take care of calling super.onCreate, do not call it here
109
this._callbacks.onCreate(this, savedInstanceState, superProto.onCreate);
11-
12-
// Add custom initialization logic here
1310
},
1411
onSaveInstanceState: function(outState) {
1512
this._callbacks.onSaveInstanceState(this, outState, superProto.onSaveInstanceState);

Diff for: demo/JavaScriptApp/app/application.android.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
var superProto = android.app.Application.prototype;
2-
// the first parameter of the `extend` call defines the package and the name for the native *.JAVA file generated.
3-
var Application = android.app.Application.extend("org.myApp.Application", {
1+
const superProto = android.app.Application.prototype;
2+
const Application = android.app.Application.extend("org.myApp.Application", {
43
onCreate: function() {
54
superProto.onCreate.call(this);
6-
7-
// At this point modules have already been initialized
8-
9-
// Enter custom initialization code here
105
},
116
attachBaseContext: function(base) {
127
superProto.attachBaseContext.call(this, base);
13-
// This code enables MultiDex support for the application (if needed)
14-
// android.support.multidex.MultiDex.install(this);
158
}
169
});

Diff for: demo/TypeScriptApp/app/app.android.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url(/Users/vchimev/Work/git/nativescript-dev-webpack/demo/TypeScriptApp/node_modules/nativescript-theme-core/css/core.light.css);ActionBar{background-color:#7F9}.app-class{background-color:#7F9}

Diff for: demo/TypeScriptApp/app/app.ios.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url(/Users/vchimev/Work/git/nativescript-dev-webpack/demo/TypeScriptApp/node_modules/nativescript-theme-core/css/core.light.css);ActionBar{background-color:#999}.app-class{background-color:#999}

Diff for: demo/TypeScriptApp/app/application.android.ts

-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
// the `JavaProxy` decorator specifies the package and the name for the native *.JAVA file generated.
21
@JavaProxy("org.myApp.Application")
32
class Application extends android.app.Application {
43
onCreate(): void {
54
super.onCreate();
6-
7-
// At this point modules have already been initialized
8-
9-
// Enter custom initialization code here
105
}
116

127
protected attachBaseContext(baseContext: android.content.Context) {
138
super.attachBaseContext(baseContext);
14-
15-
// This code enables MultiDex support for the application (if needed)
16-
// android.support.multidex.MultiDex.install(this);
179
}
1810
}

0 commit comments

Comments
 (0)