Commit Graph

39 Commits

Author SHA1 Message Date
Martin Guillon
46705ee332 refactor(core-modules): implement createNativeView and initNativeView for all components
refactor(core-modules): implement createNativeView and initNativeView for all components
2018-09-26 13:59:12 +03:00
Manol Donev
ca0043701b refactor: remove obsolete ViewHelper.setBackground method (#6240) 2018-09-05 17:35:59 +03:00
Vasil Trifonov
398c9b3f33 feat(typings): Adding Android typings for API levels from 17 to 27 (#5890)
Adding android typings for API levels from 17 to 27

BREAKING CHANGES:
There is no longer added `I` prefix in the names of the interfaces. For example `android.view.IMenuItem` is now `android.view.MenuItem`. This matches the original name of the interface in the android framework.
2018-07-05 18:36:23 +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
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
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
Hristo Hristov
00d82010ae propagate inheritable values only on child added. (#3926)
segmented bar createNativeView returns the nativeView
2017-04-03 11:08:11 +03:00
Hristo Hristov
e6250e718a Disable recycling of native views
createNativeView will set iOS nativeView if it is null/undefined
2017-03-28 18:08:59 +03:00
Hristo Hristov
c18a76c93a rename:
_createNativeView to createNativeView;
_initNativeView to initNativeView
_disposeNativeView to disposeNativeView
_resetNativeView to resetNativeView
2017-03-28 18:08:59 +03:00
Hristo Hristov
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
Panayot Cankov
2b28730011 Split get/set native to getDefault setNative 2017-03-22 16:37:52 +02:00
vakrilov
a824224cca FIX: Segmenter bar thickness 2017-03-14 14:42:54 +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
Hristo Hristov
1d49f5f3c3 fix padding on text-view & text-field (#3758)
* fix padding on text-view & text-field
text-base is now snapshotable
view.android is now snapshotable

* createNativeView returns the nativeView for android
Fix image tests
Implement test for image loaded from res://
EffectivePaddings updated when nativeView have some from its native theme
2017-03-09 16:09:53 +02:00
Hristo Hristov
ea22eb9c20 refactoring circular imports 2017-03-06 14:05:55 +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
d230fa3605 Fix: Setting slected color on SegmentedBar affects all seg-bars 2017-02-22 11:20:51 +02:00
Hristo Hristov
f539dd5f95 Improve background setter in iOS (#3582)
CoercableProperty now inherits from Property
VS Code typescript sdk removed
ViewBase will no longer clear native view if recycleNativeView is false
2017-02-06 11:49:54 +02:00
vakrilov
e5f7c7e4d4 Segmented bar styles 2017-02-01 17:45:14 +02:00
Hristo Hristov
e34b0f622c fix span (#3510)
* Remove Bindable.
Fix Observable & ObservableArray tests
Fix formattedString text
Change implementation of Span, FormattedString & TextBase
properties valueChange called before native setter

* revetred formattedString tests asserts - formattedText update text property again
properties - when getting value we now use always property name instead of key (using key could return undefined for property that is set to its default value)
updated fontSize & fontInternal properties on all controls
fix font properties so that fontInternal is reset if the new font is the same as Font.default

* fix tslint errors
2017-01-20 16:42:20 +02:00
Nedyalko Nikolov
9479a9918f Fixed tslint errors. 2017-01-11 15:35:05 +02:00
Nedyalko Nikolov
b4575e1d5b Fixed xml-declaration tests. 2017-01-11 14:36:08 +02:00
Nedyalko Nikolov
5a3cfbeda9 SegmentedBar tests fixed. 2017-01-09 18:24:09 +02:00
Hristo Hristov
bfab188ba0 clear nativeView field. (#3418)
moved some native setters from TabView to TabViewItem.
shorthand properties converters now accounts for unsetValue.
better formatting for test duration.
2017-01-05 18:08:42 +02:00
vakrilov
c30be0d606 View lifecycle methods 2017-01-04 17:18:45 +02:00
Rossen Hristov
9d6f6cca79 Fix font on Android 2017-01-04 14:13:33 +02:00
Rossen Hristov
299cac42bf Fix: SegmentedBar crash using a number as title
Resolves #issue-3210
2017-01-03 12:02:46 +02:00
PanayotCankov
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
Hristo Hristov
b20fd7fd4c Fix nativeView issues
Fix Listeners base class
2016-12-15 10:46:20 +02:00
Hristo Hristov
07e2102c5d restore properties deleted with merge 2016-12-13 15:51:18 +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
a64847ca9d next 2016-12-13 15:51:18 +02:00
Vladimir Enchev
b650bbbb6a Api 21 fix (#3187) 2016-11-28 14:43:03 +02:00
Vladimir Enchev
beb70ee3f7 setColorFilter used if android.os.Build.VERSION.SDK_INT >= 21 (#3143) 2016-11-23 09:42:31 +02:00
vB Results, LLC
978bd8c524 Use setBackgroundDrawable for API < 16. (#3108) 2016-11-18 14:47:06 +02:00
Nedyalko Nikolov
c46f216d31 SelectedBackgroundColor property exposed via css. (#2973) 2016-10-28 10:26:10 +03:00
Hristo Deshev
b812411ce1 Fix SegmentedBar selectedIndex change event when items not bound.
The Android implemantation wasn't raising the event in that case.
2016-05-30 11:49:40 +03:00
Panayot Cankov
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00