* test(e2e): update modal navigation app
Add layout as root.
Add show modal layout.
* chore(frame): move frame stack modifiers in a separate frame-stack module
* feat(frame): handle back navigation when using common layout as root element
Currently webpack fails if app is using wrap layout since it is not registered here. Registering it manually in the app works as a workaround, but still I think it would be nice to have it here by default.
* fix(android/text ios/text): allow -1 to be a valid binding value
Instead of using -1 as special value, use Symbol(-1)
so that it can't be reset accidentally
Closes issue #5559
* renamed the symbol
* feat(list-view): Adds the ability to check whether or not an Item at index is Visible on screen within a listView
* feat(list-view): add the unit-test for checking if list-item is visible.
* clean(list-view): fix invalid reference in list-view-common
* chore(list-view): remove unused logic
* test(list-view) updates the tests for checking if item at index is visible
* chore(ListView Tests): update the test_check_if_item_at_index_is_visible unit test to include 40 children, and test if the last item is visible or not.
* Chore(ListView IOS): Apply requested changes to the for-loop, and replace with Array.some for readability.
* chore(ListView android): Fix TSLint issues.
* chore(e2e): add @types as devDependencies
Update `tsconfig.json` file.
* fix-next(frame): remove current entry fragment on reset root view
* refactor(e2e): undo skip tab root tests
* refactor(frame): extract disposeCurrentFragment() method
Extract the common logic from _onRootViewReset() and onUnloaded() methods to avoid code duplication.
Expose method on View class onBackPressed(). Third party controls
like RadSideDrawer can use this method to override the default Android
back button handling. By default the app closes.
Rework the frame api to support working with multiple Frames.
* frameModule.topmost() - now returns the last navigated Frame or
the currently selected tab item's Frame if the tab item's view is a
Frame.
* frameModule.getFrameById(id: string) - returns a navigated Frame by id.
* args.object.page.frame - can be used in page elements event handlers.
Returns the Frame of the current element's page.
* chore: Update madge-android npm script path
* feat(ios-image-source): standardize quality scale in image-source for both platforms
Normalize quality in saveToFile and toBase64String to follow 0-100 scale - standardize implementation on both platforms
closes#5474
We want webpack's uglification to mangle function and class names
but that's what the current implementation of the CSS in {N} relys on
to get the CSS type for each view when targeted by CSS type selectors.
The implementation is changed a little so now the CSS type can be set
directly on the prototype of each View class or for TS, through decorator.
BREAKING CHANGES:
Extending classes requires marking the derived class with @CSSType
The root classes are not marked with CSSType and classes derived from ViewBase and View
will continue to work as expected. More concrete view classes (Button, Label, etc.) are
marked with @CSSType now and store their cssType on the prototype suppressing the previous
implementation that looked up the class function name. So clien classes that derive from one of
our @CSSType decorated classes will now have to be marked with @CSSType.
* fix(animations): change throw -> trace to avoid unnecessary app crash
Fixes major cause of crashes/bugs in production apps using animation.
* Fix fix animation throw (#1)
* chore(tests): Cleanup code snippets comments
* refactor(animations): Plat-specific cancel and play methods refactored
BREAKING CHANGE: [Android] NativeScript no longer overwrites the horizontal/vertical alignment on the user-defined root visual element when opening it in modal dialog window (i.e. not fullscreen).
If your application logic relied on the previous behavior you need to manually set `horizontalAlignment="center"` and `verticalAlignment="middle"` on the root visual element you are showing modally.
* Do not depend on current device screen while calculating Image Asset size.
* Scale the image asset to the exact requested size.
* Process image assets natively, pass keepAspectRatio based on the stretch property and Asset options.
* Fixed the splashscreen resource name as it cannot be read when containing a dot.
* Updated the Image Asset scale and rotate logic based on the Native one.
* Make the ImageAsset size more important than the Image decode size as its more specific.
* Fixed tslint errors.
* Added filePath support in the ImageAsset constructor for iOS in order to unify it with the Android implementation, support for relative files and file not found support errors.
* Added unit tests for ImageAssets.
* Added a sample app for UI testing of image-view with ImageAsset src.
* chore: apply PR comments