This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree 6 files changed +11
-6
lines changed
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" ;
2
2
3
3
@JavaProxy ( "org.myApp.MainActivity" )
4
- class Activity extends android . support . v7 . app . AppCompatActivity {
4
+ class Activity extends androidx . appcompat . app . AppCompatActivity {
5
5
public isNativeScriptActivity : boolean ;
6
6
private _callbacks : AndroidActivityCallbacks ;
7
7
8
8
protected onCreate ( savedInstanceState : any ) : void { // android.os.Bundle
9
9
// Set isNativeScriptActivity in onCreate (as done in the original NativeScript activity code).
10
10
// The JS constructor might not be called because the activity is created from Android.
11
11
this . isNativeScriptActivity = true ;
12
-
12
+
13
13
if ( ! this . _callbacks ) {
14
14
setActivityCallbacks ( this ) ;
15
15
}
Original file line number Diff line number Diff line change 1
1
declare const android : any ;
2
+ declare const androidx : any ;
Original file line number Diff line number Diff line change 1
1
const frame = require ( "ui/frame" ) ;
2
2
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" , {
5
5
onCreate : function ( savedInstanceState ) {
6
6
// Set isNativeScriptActivity in onCreate.
7
7
// The JS constructor might not be called because the activity is created from Android.
Original file line number Diff line number Diff line change 1
1
import { setActivityCallbacks , AndroidActivityCallbacks } from "ui/frame" ;
2
2
3
3
@JavaProxy ( "org.myApp.MainActivity" )
4
- class Activity extends android . support . v7 . app . AppCompatActivity {
4
+ class Activity extends androidx . appcompat . app . AppCompatActivity {
5
5
public isNativeScriptActivity : boolean ;
6
6
private _callbacks : AndroidActivityCallbacks ;
7
7
protected onCreate ( savedInstanceState : any ) : void { // android.os.Bundle
Original file line number Diff line number Diff line change 1
1
declare 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