Commit Graph

37 Commits

Author SHA1 Message Date
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
Hristo Hristov
9e3222781a backgroundImage property now use Fetcher & Cache as Image component (#4030)
* backgroundImage property now use Fetcher & Cache as Image component
Fix GridLayout tests on iPhone Plus - actualLength wasn’t rounded
ImageCache is closed when activity is stopped

* Fix reset of background drawable.

* additional check for drawable

* imageCache init cache on activity Started
2017-04-21 16:50:12 +03:00
Hristo Hristov
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
Panayot Cankov
2bd9d6f167 All units ceil up, except percents that do round 2017-03-15 17:49:47 +02:00
Hristo Deshev
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
vakrilov
244034e39e Fix: set/reset background in android 2017-03-07 17:02:17 +02:00
Hristo Hristov
33aa48bdfd Add support for snapshot
Fix Layout class getMeasuredWidth & getMeasuredHeight
Move some classes to widgets
Fix API17 tests
2017-03-06 14:05:55 +02:00
vakrilov
cf2b3de662 Fix: Background not re-drawing on android 2017-02-24 13:52:38 +02:00
vakrilov
8a0d98e815 Inset clip path + Background circ-ref 2017-02-21 18:00:48 +02:00
vakrilov
b34802d7fc Use density for clip-path calculations 2017-02-21 14:14:32 +02:00
Panayot Cankov
70cc1dd5d9 Move the effective* values from style to this 2016-12-27 10:57:10 +02:00
Rossen Hristov
417064fd38 Fix Android lifecycle 2016-12-20 16:12:52 +02:00
Panayot Cankov
6feeb140e3 Fixing type errors in tests 2016-12-19 10:36:25 +02:00
Hristo Hristov
befb494a50 up to segmented-bar.ios 2016-12-13 15:51:18 +02:00
Hristo Hristov
1202cb7288 almost all without layouts 2016-12-13 15:51:18 +02:00
Hristo Hristov
645f428f59 alpha1 2016-12-13 15:51:18 +02:00
Rossen Hristov
30d202b5f1 Fix: Transparent border rendered as black
Resolves #3113
2016-11-21 12:25:13 +02:00
vB Results, LLC
978bd8c524 Use setBackgroundDrawable for API < 16. (#3108) 2016-11-18 14:47:06 +02:00
Rossen Hristov
d674d806aa Use setColorFilter on post-21 ActionBars only 2016-11-07 14:13:31 +02:00
Rossen Hristov
e507d6403a Fix: Enhancement: Android Actionbar elevation lost with background-color
Resolves #1799
2016-11-03 16:49:12 +02:00
Rossen Hristov
28f084e7d2 Fix: java.lang.NumberFormatException when applying clip-path with percentage values
Resolves #3007
2016-11-02 16:59:06 +02:00
Rossen Hristov
52fb85acd3 Prevent padding from accumulating
Related to #2719
2016-09-19 10:48:48 +03:00
Rossen Hristov
a05f842a84 Non-uniform borders 2016-09-17 09:27:36 +03:00
Maya Zhecheva
51bfa93879 Padding is not reset if the elements has a border-related property set 2016-09-14 17:17:20 +03:00
Rossen Hristov
2cff891ca0 Background borderWidth, borderColor, borderRadius and clipPath are now used on Android only and ignored on iOS
Related to #2318
2016-06-30 16:15:56 +03:00
Rossen Hristov
ad05f55dc0 Fix: background-repeat is not respected
Related to #2318
2016-06-30 11:26:24 +03:00
Rossen Hristov
05a3f3c846 Remove optimisation 2016-06-24 16:23:01 +03:00
Rossen Hristov
53a699b50b Background performance optimizations 2016-06-24 14:49:11 +03:00
Rossen Hristov
345b2a8163 Fix tslint errors 2016-06-20 12:18:36 +03:00
Rossen Hristov
36fd83365c Fix tslint errors 2016-06-20 12:13:39 +03:00
Rossen Hristov
559a7c816e Implement the BorderDrawable class used in background.android.ts in Java
Resolves #2318
2016-06-20 11:30:52 +03:00
Rossen Hristov
0407aaf5d2 Remove a forgotten console.log 2016-05-31 16:49:07 +03:00
Rossen Hristov
0a8d211665 Enable hardware acceleration for views animations in Android
Resolves #2217
2016-05-31 16:46:19 +03:00
Rossen Hristov
fd9a0c98e6 Merge pull request #2211 from NativeScript/layer-type
Fixed:  Android layerType should not be changed if there is no need
2016-05-31 09:14:04 +03:00
Rossen Hristov
e2f1e272b4 Fixed: Android layerType should not be changed if there is no need
Resolves #1899
2016-05-30 16:53:09 +03:00
Panayot Cankov
58b4a6eec6 Add 'npm test' for mac 2016-05-30 16:10:57 +03:00
Panayot Cankov
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00