Commit Graph

656 Commits

Author SHA1 Message Date
Panayot Cankov
d62df3789c Do not change the Android layer types (hardware/software) (#4625) 2017-08-25 10:45:58 +03:00
Panayot Cankov
3a447b6f3f Added @profile on several key methods in the Android lifecycle, refactored by extracting into methods a little (#4685) 2017-08-24 13:10:53 +03:00
Daniel Leal
7b364613da fix: typo on android utils, getPalleteColor to getPaletteColor (#4687)
* fix: typo on android, getPalleteColor to getPaletteColor

* fix: adress comments
2017-08-24 11:55:31 +03:00
Hristo Hristov
b6d5510627 Fix crash where some android Drawables doesn't implement getConstantState... (#4742)
Changed all places where getConstantState was used.
2017-08-24 11:06:33 +03:00
Hristo Hristov
06ad345015 Fix issue 4302 (#4723)
Fix tests for that issue
2017-08-22 09:52:07 +03:00
Hristo Hristov
9bcf4ef460 Removes list-view selected state when rowHeight is set (#4725) 2017-08-22 09:50:54 +03:00
Eddy Verbruggen
6e06eba218 Fixed a bunch of typo's and minor errors in TypeScript definition files. (#4707)
* Fix a bunch of typo's and minor errors in TypeScript definition files.

* Implemented the requested change by @hshristov
2017-08-21 11:22:04 +03:00
Hristo Hristov
bba7a82bdf Disable recycling, refactoring & fixes (#4705)
* Added tests for native view recycling
Disabled android native view recycling
Move toString from view-common to view-base
Fix crash on application restore and navigation back on API26
Added setAsRootView method
Added missing logo into perf-tests/recycling app

* additional fix for image-source-tests. ios is case sensitive.

* Add @private to some internal properties
Fix where padding is not respected when background is reset.
2017-08-17 09:15:35 +03:00
Hristo Hristov
2701ea3c1e Fix failing test on ios 11 (#4686)
Add new perf-test page for view recycling
Changed the initialization of TextTransformation field
2017-08-16 15:19:01 +03:00
Stanimira Vlaeva
08dcfabe82 refactor(date-picker): value converter for month is 1-based (#4656) 2017-08-08 17:07:21 +03:00
Hristo Hristov
24923445bd Image cache is cleared when livesync happens (#4672) 2017-08-08 16:52:39 +03:00
Hristo Hristov
2c27b1ac7a Cache android.widget.SeekBar as SeekBar for better performance (#4669)
* Cache android.widget.SeekBar as SeekBar for better performance
Made singleton listener for SeekBar
Fix slider issue
Add slider test

* Futher refactoring
2017-08-08 16:04:41 +03:00
Alexander Vakrilov
50d399101e Fixes TabView icons changes. (#4666)
* Fixes TabView icons/title changes.

* Access TabLayput trough parent

* TabView icon change example
2017-08-08 13:06:56 +03:00
Hristo Hristov
075e70e336 cache page on forward navigation (#4652)
* cache page on forward navigation
Still some failing navigation tests

* Current page is kept alive when navigating forward
Refactoring code and removing all hacks and flags
Remove one module circular reference

* Disable Page recycling because when there is transition between pages the nativeView stays animated (e.g. when transition is Fade the hidden page nativeView stays with Alpha 0)
Disable recycling if there is native anitmation

* Fix failing tests on ios & android API17
Fix wrong urls in http tests
Made some timer tests async

* Animations are not stored in BackstackEntry instead of Fragment because fragments could die (activity die) and recreated and we lose animations.

* Fix android crash when activity is recreated.
Refactoring transitionListener.
2017-08-07 17:24:12 +03:00
Stanimira Vlaeva
14098d40db fix: set default values to time widgets (#4383) 2017-08-03 22:03:05 +03:00
Vasil Chimev
c26f1c916a Add line-height test page (#4638)
* Add lineHeight property to text-base.d.ts

* Add line-height test page
2017-08-02 09:30:29 +03:00
Hristo Hristov
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
Alexander Vakrilov
7983895c8e FIX: Background drawable cache conflicts with local property (#4633) 2017-08-01 11:53:42 +03:00
Alexander Vakrilov
2dbd1b19ea Fix: refresh flat property on change in IOS (#4628)
* Fix: refresh flat property on change in IOS

* Fix typos
2017-08-01 10:40:51 +03:00
Eddy Verbruggen
12020bd8bb Implement an ActionBar 'flat' property to remove the bottom border/shadow and (on iOS) translucency (#3900)
* #2740 Feature Request: Improved ActionBar CSS Support

* Now using a dedicated 'flat' property.
2017-07-28 15:30:30 +03:00
Panayot Cankov
8711b54b5e Shorthand properties does not update if sub-property is changed (#4607) 2017-07-27 15:42:47 +03:00
Panayot Cankov
43659799bc Implement non uniform border corner radiuses and fix blinking image-view radiuses (#4573)
* Image corners were blinking in #4322 and CSS border will now draw non uniform corner radiuses if the border color is uniform

* Implement per-side corner radiuses for iOS

* Update stretch-mode example

* Update matrix-mode example

* Update image resources

* Add clipping for non uniform radii without border width, don't throw for missing image resources in css
2017-07-27 15:36:47 +03:00
Panayot Cankov
2f6ca2524b CssAnimationProperties, when unset, were not setting the default native value. (#4595) 2017-07-26 19:16:26 +03:00
Alexander Vakrilov
5a660a6eda Set text-field and text-view tintColor to textColor (iOS) (fixes #4357) EXTENDED (#4549)
* set text-field and text-view tintColor to textColor (#4357)

* Rest tint color
2017-07-25 11:22:21 +03:00
Stanimira Vlaeva
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
Stanimira Vlaeva
43b21ce7e7 refactor(css-selector): export createSelector method (#4580)
needed for NativeScript Angular's animation driver
2017-07-20 18:02:01 +03:00
Hristo Hristov
a17cd1169c fix layer type recycling (#4574) 2017-07-19 15:39:07 +03:00
Eddy Verbruggen
74f26f4498 Add CSS support for line-height (#4534)
* Add CSS support for line-height (issue #1664)

* Implemented @vakrilov's feedback

* Implemented @vakrilov's feedback (changed Android default impl)
2017-07-13 15:00:18 +03:00
Steve McNiven-Scott
3dbcf088be Allow toggling of visible scrollbar indicators (#4523)
* Allow toggling of visible scrollbar indicators

* Add unit test

* Make what the prop does more clear

* Fix tslint

* Rename property per @vakrilov

* Missed string property rename

* Move property from method

* Update orientationChanged to use new property name
2017-07-11 18:14:29 +03:00
Hristo Hristov
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
Hristo Hristov
974ef9d932 Fix CssAnimationProperty default value (#4510) 2017-07-06 09:25:17 +03:00
Panayot Cankov
8adb2fdfef Fix TypeScript 2.4 errors, introduced mainly due weak types and covariant checking for callbacks (#4476) 2017-07-03 11:57:00 +03:00
Alexander Vakrilov
23757e5dfc Enable recycling of nativeView 2 (#4467)
* enable recycling of nativeView

* backgroundInternal is reset if setting new value leads to background.isEmpty() == true.

* android background.getDefault always return copy of the background. Now all controls that mutate the background can be reset to initial state (e.g. Button & ActionBar)
passing resources to copied background so it respect density.
fix properties initNativeView

* reset padding when backgroundInternal is reset.

* Fix text reset
Fix padding reset

* fix tsc errors

* fix ugly text rendering.

* Add unit tests for recycling native views
Fix several issues that came from the above tests
Fix maxLength property missing a converter callback
Remove old files

* Remove old files

* Revert backgroundInternal setter

* change the order of tests so that appium can work again

* Remove suggestion on every TextView & TextField init (strangely it is enabled after view is recycled....)

* Fix function to get parent layout if specified

* Button stateListAnimator restored when button is recycled
zIndex defaultValue is now undefined instead of NaN

* revert zIndex.setNative to always clear stateListAnimator because it was breaking one UI test (setting value=0 was returning the previous stateListAnimator)

* fix search-bar backgound-color recycling

* Fix alignments setters

* Fix imageView recycling
Fix button recycling
Fix edit-text recycling
resetNativeView is called only if recycleNativeView flag is true

* Fix incorrect merge

* Fix text-view & text-field textTransform

* Fix EditText text reset

* Fix runtime crash on ARM emulator API 21

* Fix text-base minHeight. maxHeight reset
Fix reset of isUserInteractionEnabled
2017-06-29 18:01:22 +03:00
kssfilo
48836cbd4c Fix iOS ActionBar problem while internet sharing #4283 (#4447) 2017-06-28 15:00:01 +03:00
Alexander Vakrilov
fca8b16ca6 Fonts refactored (#4436)
* Fonts refactored

* Fix: never return null font
2017-06-28 14:49:02 +03:00
Eddy Verbruggen
f399f6c62b Ability to load local files in a WebView on iOS devices (#4444)
* Ability to load local files in a WebView on iOS devices

* Ability to load local files in a WebView on iOS devices (removed doc-comments in test)
2017-06-28 11:00:02 +03:00
Panayot Cankov
1420fa8fcc Fixes the old snapshot build (#4457) 2017-06-27 13:50:08 +03:00
Panayot Cankov
bbffa5480e Used the wrong flag to check if snapshot was enabled (#4446) 2017-06-23 17:30:41 +03:00
Panayot Cankov
b94a61f9a5 Globals in snapshot are overriden by the V8 on start, so they have to be installed later (#4387) 2017-06-15 10:36:50 +03:00
Alexander Vakrilov
1d20845b7c Use AppCompat SearchView (#4371)
* Use AppCompat SearchView

* GetNative elements for appcompat

* Classes renamed

* test modified
2017-06-14 14:11:04 +03:00
Stanimira Vlaeva
4319ca5fc5 refactor(animations): export declarations parser (#4370) 2017-06-14 11:52:22 +03:00
Alexander Vakrilov
f2462158fb Chrome devtools elements tab support for Android (#4351)
* Enable chrome-devtools elemets tab

* Trigger updates when property is chaned form native

* Tslint fixes

* Don't run dom-elemet tests in IOS

* fix tests

* Create package.json

* Update package.json

* domNode changed to field for performance
2017-06-12 16:48:27 +03:00
Stanimira Vlaeva
b7c61cad96 fix(css-animations): convert transform value properly (#4352) 2017-06-09 20:54:46 +03:00
Stanimira Vlaeva
618433816e fix(slider): correct maxValue setter for android (#4346)
The setter should invoke setNativeValuesSilently with the new value and
max value respectively.

fixes #4343
2017-06-09 18:20:25 +03:00
Stanimira Vlaeva
9bba250424 Refactor transform animations (#4296)
* feat: add matrix module

* fix(animations): parse transform property correctly

* fix(css-animations): compute transformation value with matrix

* refactor: add typings for keyframes array in style scope

* fix(animations): transform regex and method invocation

* fix(matrix): rewrite decomposition function

* refactor: transform animations parse

* test: add tests for css animation transform

* refactor: move transformConverter to style-properties

* lint: remove unnecessary comma

* lint: remove unnecessary word in d.ts

* fix(style-properties): correctly use transformConverter

* fix(matrix): flat multiply affine 2d matrices

cc @PanayotCankov
2017-06-09 18:20:07 +03:00
Alexander Vakrilov
e33eca63d6 Implement custom measure for ios btn when textWrap is true (#4326)
Implement custom measure for ios btn when textWrap is true
2017-06-08 10:29:50 +03:00
Panayot Cankov
014e7a8e0f add profile for functions, profile CSS-es on startup, use __time (#4227)
Call native setters once when a page is instantiated.

Fix background not being reset, Label's background is now set to background, not layer

Make the nativeView field instead of property for performance reasons
2017-06-08 09:51:09 +03:00
Panayot Cankov
51b351f5b6 Add timeline traces in the console, let enabling them through the package.json 2017-06-02 16:34:15 +03:00
Alexander Vakrilov
63633533bc Merge pull request #4190 from NativeScript/EddyVerbruggen-eddyverbruggen/issue-3614-text-maxlength-property
Implemented feature request: TextField `maxLength` property support.
2017-06-01 13:31:54 +03:00
Alexander Vakrilov
9f47746d98 Merge pull request #4292 from NativeScript/fix-ios-text-view-hint
Fix: IOS text view hint should never show while editing
2017-06-01 13:31:28 +03:00