This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +11
-6
lines changed Expand file tree Collapse file tree 6 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- import { setActivityCallbacks , AndroidActivityCallbacks } from "tns-core-modules/ui/frame" ;
1+ import { setActivityCallbacks , AndroidActivityCallbacks } from "tns-core-modules/ui/frame" ;
22
33@JavaProxy ( "org.myApp.MainActivity" )
4- class Activity extends android . support . v7 . app . AppCompatActivity {
4+ class Activity extends androidx . appcompat . app . AppCompatActivity {
55 public isNativeScriptActivity : boolean ;
66 private _callbacks : AndroidActivityCallbacks ;
77
88 protected onCreate ( savedInstanceState : any ) : void { // android.os.Bundle
99 // Set isNativeScriptActivity in onCreate (as done in the original NativeScript activity code).
1010 // The JS constructor might not be called because the activity is created from Android.
1111 this . isNativeScriptActivity = true ;
12-
12+
1313 if ( ! this . _callbacks ) {
1414 setActivityCallbacks ( this ) ;
1515 }
Original file line number Diff line number Diff line change 11declare const android : any ;
2+ declare const androidx : any ;
Original file line number Diff line number Diff line change 11const frame = require ( "ui/frame" ) ;
22
3- const superProto = android . support . v7 . app . AppCompatActivity . prototype ;
4- android . support . v7 . app . AppCompatActivity . extend ( "org.myApp.MainActivity" , {
3+ const superProto = androidx . appcompat . app . AppCompatActivity . prototype ;
4+ androidx . appcompat . app . AppCompatActivity . extend ( "org.myApp.MainActivity" , {
55 onCreate : function ( savedInstanceState ) {
66 // Set isNativeScriptActivity in onCreate.
77 // The JS constructor might not be called because the activity is created from Android.
Original file line number Diff line number Diff line change 11import { setActivityCallbacks , AndroidActivityCallbacks } from "ui/frame" ;
22
33@JavaProxy ( "org.myApp.MainActivity" )
4- class Activity extends android . support . v7 . app . AppCompatActivity {
4+ class Activity extends androidx . appcompat . app . AppCompatActivity {
55 public isNativeScriptActivity : boolean ;
66 private _callbacks : AndroidActivityCallbacks ;
77 protected onCreate ( savedInstanceState : any ) : void { // android.os.Bundle
Original file line number Diff line number Diff line change 11declare const android : any ;
2+ declare const androidx : any ;
Original file line number Diff line number Diff line change 1+ {
2+ "useLegacyWorkflow" : false
3+ }
You can’t perform that action at this time.
0 commit comments