37 Commits

Author SHA1 Message Date
4f39fb728b chore: update tslint rules (#7391) 2019-06-26 15:13:48 +03:00
2723744091 chore(android): fix circular reexports (#7399) 2019-06-24 19:32:03 +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
f189152a4b refactor: refactor 2019-05-09 09:39:21 +03:00
a84b6301ed chore: fix tslint errors 2019-05-07 15:58:16 +03:00
66d631ebca Revert "Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)"
This reverts commit 8973a6febde4a4b41637d80b17506a7d25ffebf8.
2019-05-07 13:58:07 +03:00
7236d32a24 fix(android-animations): reuse animatorSet to prevent high memory usage (#6930) 2019-02-21 10:49:35 +02:00
fa80355464 fix(animations): change throw -> trace to avoid unnecessary app crash (#5475)
* 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
2018-03-08 20:42:33 +02:00
8973a6febd Revert "feat(animation): support animating width/height properties (WIP) (#4917)" (#5136)
This reverts commit 57ed0cf405be44e31358ff17f372b5d926e63639.
2017-12-07 12:11:24 +02:00
57ed0cf405 feat(animation): support animating width/height properties (WIP) (#4917)
* feat(animation): support animating width/height properties

 - width/height can be specified in any valid PercentLength form that can be parsed.
 - make width/height properties be based on animatable CSS property. TODO: affectsLayout????
 - add a few basic tests. Could probably use a few more?
 - fix a few null pointer exceptions in PercentLength helpers

* test(ui): add animation examples to ui-tests-app

 - basic height animation
 - height animation in StackLayout
 - fix an issue where strings were not automatically converted to PercentLength when calling directly into `View.animate`

* test(ui): cleanup and add summary/details layout example

 - use height transition to cover textview content.
 - when clicking on the summary view, animate the summary height up to a small header and show the text view.
 - fake animating the height on the textview by very subtly animating its translateY value while shrinking the header height. This tricks your mind into think that the text view is also vertically growing, even thought it's just slightly moving up along the Y axis.

* test(ui): add animation curves test page

 - verify all built-in animation curve types work as expected.

* test(ui): update animation curve example for multiple properties

 - add a segmented bar that allows choosing which properties to animate using the various curves.
 - interestingly, a whole bunch of properties fail with spring on iOS.
 - refactor width/height animations handlers to remove duplication on iOS.
 - implement proper spring animation for width/height on iOS.

* test(ui): add stress example with 100 labels animating and fps meter

 - same curve/property selector as the curves example, but with 10x10 grid of items that stagger animate, and an FPS meter.
 - sadly it looks like width/height animations are considerably slower than the others when you have a bunch of them. I'm not sure that's entirely surprising since they interact with the layout system.
 - the better news is that even with the army example, my really old android 4 tablet manages ~30fps. On height/width animations from the curves example, the old tablet does fine with no noticeable FPS hit.

* refactor: deduplicate existing droid width/height animations

 - stash to prep for replacing with LayoutTransition.

* test(animation): unit tests for extent animation and PercentLength parse

 - update animation scaffold to allow specifying the parent stack layout height/width
 - test basic supported units, px, %
 - test basic percent length parser behaviors

* chore: cleanup cruft and remove noise from diff

 - undo the import mangling that WebStorm helpfully applied
 - remove .editorconfig file
 - clean up in tests, remove cruft

* chore: cleanup from review

 - more import changes

* chore: remove .editorconfig
2017-12-05 13:55:54 +02:00
d62df3789c Do not change the Android layer types (hardware/software) (#4625) 2017-08-25 10:45:58 +03:00
0f14101238 recycling now happens only if nativeView and android properties are not accessed. (#4627)
recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
2017-08-01 15:04:16 +03:00
4bd3a94873 fix(animations): check if target is present before removing its animation (#4586)
In Angular, if the NativeScriptAnimationModule is imported in another
NgModule more than once (which shouldn't be done), the renderer is instantiated twice. This
causes animation with empty targets to be created. If such animation is
removed, the app will crash. Additional check if the target is present
will prevent this.
2017-07-25 10:28:09 +03:00
09535627b9 disable recycling on specific button (#4527)
* disable recycling on specific button
add more thorough test for view recycling
fix memory leak with android ActionBar
improve padding reset when view is recycled
improve reset of several controls

* stopping local animations when view is recycled
fix tns-ios version in tests/package.json

* Fix isClickable on android when reusing nativeView
2017-07-11 09:48:08 +03:00
974ef9d932 Fix CssAnimationProperty default value (#4510) 2017-07-06 09:25:17 +03:00
5cc8def8e4 Fix broken _onAndroidAnimationEnd after back navigation 2017-04-25 14:32:50 +03:00
92d015b8d8 Animations were always played as keyframes and kept overriding the local values. Android setAlpha has deprecated int overload, now it is guided to use the float one. Android background color was animated using css values instead of local or the keyframe one. 2017-04-06 14:50:40 +03:00
10f8cd4d2f Fix android PathInterpolator 2017-04-04 11:31:27 +03:00
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
b89951845b Fix CSS animations for elements that have not been loaded yet.
- Always apply animations even if it happens before the loaded event.
- Add an extra check for Android LinearInterpolator to get rid of a
curve resolution crash.
2017-03-24 15:28:29 +02:00
2b28730011 Split get/set native to getDefault setNative 2017-03-22 16:37:52 +02:00
629eb6e683 Use relative imports in tns-core-modules.
Use tns-core-modules/* imports in outside code (apps, tests, etc)
2017-03-13 14:37:59 +02:00
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +02:00
b12f112a44 Fixed tslint errors 2017-02-08 17:14:20 +02:00
5265bf0ae3 Animation properties and some backward compatability with the QSF 2017-02-08 10:52:54 +02:00
fec5e92dbe Fix tracing 2017-01-16 13:29:46 +02:00
c3327ea52f Fix animations and lots of cyclic requires 2017-01-13 14:41:38 +02:00
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
1202cb7288 almost all without layouts 2016-12-13 15:51:18 +02:00
645f428f59 alpha1 2016-12-13 15:51:18 +02:00
bb2c7aa60a partial state 2016-12-13 15:51:18 +02:00
b58e0b08a3 refactoring 2016-12-13 15:51:18 +02:00
d810a779fe Fixed animation value sync issues 2016-06-14 11:31:04 +03:00
17cc067e25 Trying to fix the Travis build. 2016-06-02 15:18:23 +03:00
0a8d211665 Enable hardware acceleration for views animations in Android
Resolves #2217
2016-05-31 16:46:19 +03:00
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00