How can I Jump to Android native activity with custom layout and use native libs with {N}?


#1

Hi,I need to Jump to custom native Android activity with custom layout(.xml) and to use native android libs(incloud .jar and .so) .
But I don’t find the tutorial for this.
Will someone give me a tutorial?
Thanks!


#2

You do it just like how you switch to new activity in native android.
take a look at this example
http://searchcode.nativescript.rocks/file/874ed1f4eb5ab8d1caeb61ee144f393d98195477/nativescript-file-photoview/file-photoview.android.ts#13

http://searchcode.nativescript.rocks is a great place to look for advanced NativeScript code samples.
Shout out to @NathanaelA :raised_hands: (he is the creator of nativescript.rocks)


#3

It dones’t work for me . I use NativateScript with Vue(don’t support typescript).
Did you have any tutorial or completed simple project?
Thanks!


#4

Dude, TypeScript is nothing but JavaScript post compilation - just a fancy syntax for good old JavaScript. No matter you use TypeScript / JavaScript / Angular / Vue - the UI components and it’s features are just same, only the syntax may be a bit different.

If you don’t understand TypeScript, you may use local or even any online compilers to see how the JavaScript code should look by simply copy pasting the TypeScript code into it.