113 Commits

Author SHA1 Message Date
e0c4933337 chore: merge release to master (#7809)
* feat(android): fix tab resource icon size based on spec (#7737)

* feat(ios): add icon rendering mode for bottom navigation (#7738)

* fix(ios-tabs): crash when add tabstrip in loaded event (#7743)

* fix(css): parse css selectors with escape sequences (#7689) (#7732)

* fix(ios-tabs): handle nesting proxy view container (#7755)

* fix-next(css): className to preserve root views classes (#7725)

* docs: cut the 6.1.0 release (#7773)

* fix(android-list-picker): NoSuchFieldException on api29 (#7790)

* chore: hardcode tslib version to 1.10.0 (#7776)

* fix(css-calc): reduce_css_calc_1.default is not a function (#7787) (#7801)
2019-09-12 14:33:03 +03:00
3adba6826b feat: add CSS classes to app/modal root views to target platform/device/orientation/type (#7606) 2019-08-19 14:09:44 +03:00
d985c33de3 chore: require relative path within tns-core-modules (#7367) 2019-06-28 18:23:39 +03:00
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
b20e771552 chore: remove deprecated apis for ns 6.0 (#7382) 2019-06-25 16:52:01 +03:00
ecd9fc3e9d feat: bundle workflow support (#7337) 2019-06-20 15:58:36 +03:00
c5db112b8d feat(android): androidX support (#7039)
* feat: migrate support library namespaces to androidX

* feat(tns-platform-declarations): update to androidX typings

* chore(tests): migrate test apps to AndroidX

* chore(tns-platform-declarations): update tsconfig to include androidx dts files

* update package.json to androidx

* chore(androidx): migrate forgotten support library namspaces

* feat(tns-core-modules-widgets): migrate to AndroidX namespaces

* chore(utils): update androidx namspace for getPaletteColor method

* chore(apps): update tns-platform-declarations package

* Update package.json
2019-06-10 09:21:41 +03:00
6d36041823 fix back navigation 2019-06-04 17:50:26 +03:00
7c22ffed45 fix(hmr): support for multi module replacement 2019-05-31 16:17:55 +03:00
0aca08755a fix(hmr): quick fade upon replace navigation (#7251) 2019-05-22 11:45:55 +03:00
8a2f592df9 refactor(HMR): Refactor livesync propagaton 2019-05-03 17:48:44 +03:00
cfa37cfa28 fix-next(HMR): apply changes in page styles at runtime when app root is a frame 2019-05-03 13:26:37 +03:00
d35e14ed0f feat(hmr): preserve navigation history on applying changes (#7146) 2019-04-23 17:47:29 +03:00
663dbb9dae chore: add deprecation console warnings (#7098) 2019-04-03 16:15:31 +03:00
3efc06ed98 feat(android): implement a 'activityNewIntent' event 2019-04-03 11:06:14 +03:00
4f0d6d36e3 refactor: guard ng and vue entry points (#7071) 2019-03-26 12:35:43 +02:00
26679d42ff refactor(): add better err msg for missing main entry (#7063) 2019-03-25 14:07:23 +02:00
44b8acd79c feat(HMR): apply changes in page styles at runtime when app root is a frame (#6857)
* feat(HMR): apply changes in page styles at runtime

* fix: livesync tests

* test: changeCssFile method

* refactor: address comments

Add a comment.
Update `let` to `const`.
Update `changesCssFile` test.

* test: add an assert
2019-02-14 14:03:13 +02:00
1f1d722008 fix(Android): a crash on application restart after livesync changes (#6756)
```
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method run failed

TypeError: Cannot read property 'getRootView' of undefined
File: file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js, line: 56, column:29
```
2019-01-08 21:03:28 +02:00
46c9de020e fix(android): raise resume event on activity.onPostResume() (#6766) 2019-01-08 15:20:11 +02:00
4dc35a5e6f fix(android): failure saving state in mixed parent/nested frame nav (#6719) 2018-12-18 10:23:02 +02:00
c034d6ead6 fix(android): animator restore logic on simulated nav (#6710) 2018-12-17 15:27:52 +02:00
790bcfb470 refactor(HMR): apply changes in application styles at runtime 2018-12-14 14:34:50 +02:00
42a1491e6e feat(HMR): apply changes in application styles at runtime
Expose `HmrContext` interface.
Apply changes in `app.css` instantly.
Avoid navigation on livesync when changes in `app.css` have been made.
Apply changes in `app.css` on back navigation.
2018-12-14 14:34:47 +02:00
c084660d0b fix(android): nested fragment disappears on parent fragment removal (#6677) 2018-12-12 14:16:10 +02:00
5b9b335489 fix(android-fragment): child already has a parent (#6589) 2018-11-23 14:48:41 +02:00
41ba93de41 fix(android): IllegalStateException with tabview&nested frames (#6495) 2018-11-05 16:17:51 +02:00
fac970e753 fix(android): back navigation on app suspend/resume (#6489) 2018-11-02 17:31:52 +02:00
95c4ec5a96 Revert "fix-next(android): restore fade animation for simulated nav (#6463)" (#6473)
This reverts commit 448936d6e6bf03c79e17648e8912a4f0eea0b43f.
2018-10-29 19:43:34 +02:00
448936d6e6 fix-next(android): restore fade animation for simulated nav (#6463) 2018-10-26 17:09:19 +03:00
4765dd9302 fix-next(android): exit fragment animation (#6421) 2018-10-26 13:32:30 +03:00
0002624d3c feat(frame): add new actionBarVisibility property (#6449) 2018-10-24 14:51:43 +03:00
af651d6e83 feat(frame): hardware back in parent frame when back states available (#6446) 2018-10-24 10:18:50 +03:00
c8c0be7684 refactor: restore animators api usage (#6403) 2018-10-16 15:37:57 +03:00
307172003d fix: nested fragments interact thru child fragment manager (#6293) 2018-10-11 17:44:30 +03:00
0bf6dc2e93 fix(android): nested frames on app suspend/resume (#6339) 2018-10-04 14:31:57 +03:00
6c9fa16f6e fix(android): parallel navigations should not be triggered (#6275) 2018-09-18 11:25:31 +03:00
12fade7155 fix: Page and Frame isLoaded undefined checks (#6255)
* fix(view): isLoaded handling

closes https://github.com/NativeScript/NativeScript/issues/6179

* refactor: Error handling code in onCreateView
2018-09-17 15:37:29 +03:00
cca548d31a refactor: AndroidFrame.hasOwnActivity cleanup (#6241) 2018-09-10 11:25:08 +03:00
0f2192d4d7 refactor: clean up unused sdkVersion lazy eval (#6194) 2018-08-17 17:04:44 +03:00
22cb539c9d fix(android-next): force frame fragment disposal on unload (#6189) 2018-08-17 11:31:44 +03:00
cc19b400b9 fix(android): suppress reflection for default animations (#6141)
Fixes `Error: java.lang.CloneNotSupportedException: Class android.support.v4.app.FragmentManagerImpl$AnimationOrAnimator doesn't implement Cloneable` in specific projects.

Related to #5785
Related to #6129 

BREAKING CHANGE


Before:
Default fragment enter animation was Android version specific

After:
Default fragment enter animation is now fade animation for all Android versions

You can customise the transition per navigation entry or globally via the [navigation transitions API](
https://docs.nativescript.org/core-concepts/navigation#navigation-transitions)
2018-08-02 16:01:52 +03:00
cf034dd04d feat(android): migrate to support library apis (#6129)
Switch Activity / Fragment / FragmentManager implementation from native framework to support library APIs

BREAKING CHANGE:


NativeScript core framework now extends support library APIs versus native framework classes as per Google's latest guidelines:
- NativeScript activities now extend `android.support.v7.app.AppCompatActivity` (vs android.app.Activity)
- NativeScript fragments now extend `android.support.v4.app.Fragment` (vs android.app.Fragment)
- NativeScript now works internally with `android.support.v4.app.FragmentManager` (vs android.app.FragmentManager) 

The implications of these changes should be mostly transparent to the developer except for the fact that the support library Fragment / FragmentManager work with Animation APIs versus Animator APIs.

For Android API Levels lower than 28 the new Fragment API uses a different fragment enter animation by default. You can customise the transition per navigation entry or globally via the [navigation transitions API](https://docs.nativescript.org/core-concepts/navigation#navigation-transitions)
Before:
Default fragment enter animation was fade animation

After:
Default fragment enter animation for API levels lower than 28 is now a fast "push fade" animation; default fragment enter animation for API levels equal to or greater than 28 remains fade animation

Before:
AndroidFragmentCallbacks interface exposed the following `onCreateAnimator(...)` method
``` ts
export interface AndroidFragmentCallbacks {
    onCreateAnimator(fragment: any, transit: number, enter: boolean, nextAnim: number, superFunc: Function): any;
    // ...
}
```

After:
AndroidFragmentCallbacks interface now exposes the following `onCreateAnimation(...)` method instead (and `onCreateAnimator(...)` is now removed)
``` ts
export interface AndroidFragmentCallbacks {
    onCreateAnimation(fragment: any, transit: number, enter: boolean, nextAnim: number, superFunc: Function): any;
    // ...
}
```

Before:
Transition class exposed the following abstract `createAndroidAnimator(...)` method
``` ts
export class Transition {
    public createAndroidAnimator(transitionType: string): any;
    // ...
}
```

After:
Transition class now exposes the following abstract `createAndroidAnimation(...)` method instead (and `createAndroidAnimation(...) is now removed)
``` ts
export class Transition {
    public createAndroidAnimation(transitionType: string): any;
    // ...
}
```

To migrate the code of your custom transitions follow the example below:

Before:
``` ts
import * as transition from "tns-core-modules/ui/transition";

export class CustomTransition extends transition.Transition {
    constructor(duration: number, curve: any) {
        super(duration, curve);
    }

    public createAndroidAnimator(transitionType: string): android.animation.Animator {
        var scaleValues = Array.create("float", 2);
        switch (transitionType) {
            case transition.AndroidTransitionType.enter:
            case transition.AndroidTransitionType.popEnter:
                scaleValues[0] = 0;
                scaleValues[1] = 1;
                break;
            case transition.AndroidTransitionType.exit:
            case transition.AndroidTransitionType.popExit:
                scaleValues[0] = 1;
                scaleValues[1] = 0;
                break;
        }
        var objectAnimators = Array.create(android.animation.Animator, 2);
        objectAnimators[0] = android.animation.ObjectAnimator.ofFloat(null, "scaleX", scaleValues);
        objectAnimators[1] = android.animation.ObjectAnimator.ofFloat(null, "scaleY", scaleValues);
        var animatorSet = new android.animation.AnimatorSet();
        animatorSet.playTogether(objectAnimators);

        var duration = this.getDuration();
        if (duration !== undefined) {
            animatorSet.setDuration(duration);
        }
        animatorSet.setInterpolator(this.getCurve());

        return animatorSet;
    }
}
```

After:
``` ts
import * as transition from "tns-core-modules/ui/transition";

export class CustomTransition extends transition.Transition {
    constructor(duration: number, curve: any) {
        super(duration, curve);
    }

    public createAndroidAnimation(transitionType: string): android.view.animation.Animation {
        const scaleValues = [];

        switch (transitionType) {
            case transition.AndroidTransitionType.enter:
            case transition.AndroidTransitionType.popEnter:
                scaleValues[0] = 0;
                scaleValues[1] = 1;
                break;
            case transition.AndroidTransitionType.exit:
            case transition.AndroidTransitionType.popExit:
                scaleValues[0] = 1;
                scaleValues[1] = 0;
                break;
        }
            
        const animationSet = new android.view.animation.AnimationSet(false);
        const duration = this.getDuration();
        if (duration !== undefined) {
            animationSet.setDuration(duration);
        }

        animationSet.setInterpolator(this.getCurve());
        animationSet.addAnimation(
            new android.view.animation.ScaleAnimation(
                scaleValues[0], 
                scaleValues[1], 
                scaleValues[0], 
                scaleValues[1]
            ));

        return animationSet;
    }
}
```
2018-07-31 18:48:34 +03:00
8813e9bc57 fix: require devtools-elements.js with the extension mentioned explicitly (#6079)
This is a workaround for the issue with `@ngtools/webpack@6.1.0-rc.2`, described here: https://github.com/NativeScript/nativescript-dev-webpack/issues/607#issuecomment-405209925
2018-07-18 11:38:22 +01:00
b0afd3ab30 fix(android): prevent error during tear down (#5947) 2018-06-14 10:01:03 +03:00
2fc1d8a8d4 chore(tsc): enable noUnusedLocals compiler option for tns-core-modules (#5755) 2018-05-10 16:12:59 +03:00
03cfc0cee3 chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors
* chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
2018-04-26 18:36:32 +03:00
4f5887b0ad fix(android): lollipop crash on changing activity context after navigation w/transition (#5700) 2018-04-20 13:46:03 +03:00
e43c7546bd fix-next(frame): remove current entry fragment on reset root view (#5533)
* 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.
2018-03-14 19:56:15 +02:00
cf8dcfa40c feat(view): expose method for android back override (#5537)
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.
2018-03-14 18:15:05 +02:00