@@ -26,11 +26,10 @@ The following steps are needed to create custom native `android.app.Application`
26
26
2 . Declare the extend:
27
27
28
28
``` javascript
29
- var application = require ( " application " ) ;
29
+ const superProto = android . app . Application . prototype ;
30
30
31
- var superProto = android .app .Application .prototype ;
32
31
// the first parameter of the `extend` call defines the package and the name for the native *.JAVA file generated.
33
- var Application = android .app .Application .extend (" org.myApp.Application" , {
32
+ android .app .Application .extend (" org.myApp.Application" , {
34
33
onCreate : function () {
35
34
superProto .onCreate .call (this );
36
35
@@ -46,12 +45,10 @@ The following steps are needed to create custom native `android.app.Application`
46
45
});
47
46
```
48
47
` ` ` typescript
49
- import * as application from "application";
50
-
51
48
// the ` JavaProxy` decorator specifies the package and the name for the native *.JAVA file generated.
52
49
@JavaProxy("org.myApp.Application")
53
50
class Application extends android.app.Application {
54
- protected onCreate(): void {
51
+ onCreate(): void {
55
52
super.onCreate();
56
53
57
54
// At this point modules have already been initialized
@@ -91,10 +88,10 @@ The core modules ship with a default `android.app.Activity` implementation, whic
91
88
2. Declare the extend:
92
89
93
90
` ` ` javascript
94
- var frame = require("ui/frame");
91
+ const frame = require("ui/frame");
95
92
96
- var superProto = android.app.Activity.prototype;
97
- var Activity = android.app.Activity.extend("org.myApp.MainActivity", {
93
+ const superProto = android.app.Activity.prototype;
94
+ android.app.Activity.extend("org.myApp.MainActivity", {
98
95
onCreate: function(savedInstanceState) {
99
96
if(!this._callbacks) {
100
97
frame.setActivityCallbacks(this);
0 commit comments