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

Commit 9fd50e4

Browse files
committed
refactor(demos): minor tweaks
1 parent f7c2fa9 commit 9fd50e4

File tree

6 files changed

+7
-31
lines changed

6 files changed

+7
-31
lines changed
Lines changed: 0 additions & 8 deletions
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
}

demo/JavaScriptApp/app/activity.android.js

Lines changed: 3 additions & 6 deletions
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);
Lines changed: 2 additions & 9 deletions
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
});
Lines changed: 1 addition & 0 deletions
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}

demo/TypeScriptApp/app/app.ios.css

Lines changed: 1 addition & 0 deletions
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}
Lines changed: 0 additions & 8 deletions
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)