Adding android typings for API levels from 17 to 27
BREAKING CHANGES:
There is no longer added `I` prefix in the names of the interfaces. For example `android.view.IMenuItem` is now `android.view.MenuItem`. This matches the original name of the interface in the android framework.
* feat: Pass NS app native controller to the native app instead of presenting it over the rootViewController
When NativeScript embedded app is created from the native one we check for whether the topmost UIViewController has NativeScriptEmbedder protocol (implemented in the iOS Runtime) method 'presentNativeScriptApp:'. If yes, we call it with the NS app viewcontroller as a parameter so the embedder has control over the NS app (where and how to present it etc.) For backwards compatibility we present the NS app on top of the topmost UIViewController as a fallback.
* style: Fix lint errors
* feat: Check for protocol instead of selector in embedding
I
* Check for rootController instead of topViewController to prevent crash if !rootController
* feat: Introduce NativeScriptEmbedder singleton
NativeScriptEmbedder is responsive for communication between the NS and the native iOS app. His delegate will implement methods which we can call from javascript such as "presentNativeScriptApp:".
* Fix typings for nativeValueChange
* Update properties.d.ts
Changed parameter name of nativeValueChange from “target” to “owner”
Fixed white space to match coding style
* Update properties.d.ts
Fixed white space
* fix(ios-dialogs): unable to show dialog from modal view
* tests(modal-navigation): add test that opens dialog inside modal view
* chore(modal-navigation): Add Dialogs tests
* chore(e2e): register `layout` files in bundle-config
* refactor(e2e): rename modal-layout to modal-layout-root
Similar to `modal-tab-root`:
https://github.com/NativeScript/NativeScript/tree/4.0.0/e2e/modal-navigation/app/modal-tab
This avoid the need to explicitly register it to webpack modules.
* refactor(e2e): rename mocha describes to contain a dash
* refactor: remove bundle-config
It is no more as `nativescript-dev-webpack@0.12.0` registers default application modules.
* fix: crash at application launch on Android P
Reference: https://developer.android.com/preview/restrictions-non-sdk-interfaces
Android P introduces new restrictions on the use of non-SDK interfaces, whether directly, via reflection, or via JNI. These restrictions are applied whenever an app references a non-SDK interface or attempts to obtain its handle using reflection or JNI.
In particular, remove reflection via Class.getDeclaredField() and fallback default transition to fade transition.
* refactor: create default transition based on SDK version
Create default transition and setup default animations based on SDK version.
This is to avoid reflection via Class.getDeclaredMethod() for Android P where it throws.
* refactor: extract isAndroidP method
* feat(view): introduce LayoutChanged event
* test(view): add LayoutChanged event tests
* chore(view-android): attach to onLayoutChange only if listener attached
* feat(view-android): override on/off in order to attach and detach from OnLayoutChangeListener
* chore(e2e): clean up webpack files
* chore(gitignore): clean up and add webpack files
* chore(gitignore): clean up webpack files
* chore(deps): clean up devDependencies