33 Commits

Author SHA1 Message Date
2085d1e4ac fix(list-view-android): app crashes on ListView item template change (#6634)
* fix(list-view): app crashes on first ListView item template change

* tests: add tests for changing ListView item template with expression
2019-01-08 13:48:47 +02:00
1ae0cfd4b3 refactor: cleanup unused elements (#6732) 2019-01-02 11:17:55 +02:00
982acdc168 feat(iOS): Safe Area Support (#6230) 2018-09-28 18:21:50 +03:00
1fac718a58 feat(UI): Added animated scroll to index for ListView (#6077)
* feat(UI): Added animated scroll to index for ListView

* Update list-view.d.ts
2018-07-19 16:40:59 +03:00
52c044891e feat(ios-list-view): introduce iosEstimatedRowHeight property. (#5568)
* feat(ios-list-view): introduce iosEstimatedRowHeight property.

* chore(ui-tests-app): add test for auto measured ListView.
2018-03-22 14:03:54 +02:00
b29f04ff16 feat(listview): add required interface for generalized listview comonent (#5524) 2018-03-22 12:43:39 +02:00
4b244921d4 feat(List-View) : Add the ability to check if an item is visible or not. (#5557)
* feat(list-view): Adds the ability to check whether or not an Item at index is Visible on screen within a listView

* feat(list-view): add the unit-test for checking if list-item is visible.

* clean(list-view): fix invalid reference in list-view-common

* chore(list-view): remove unused logic

* test(list-view) updates the tests for checking if item at index is visible

* chore(ListView Tests): update the test_check_if_item_at_index_is_visible unit test to include 40 children, and test if the last item is visible or not.

* Chore(ListView IOS): Apply requested changes to the for-loop, and replace with Array.some for readability.

* chore(ListView android): Fix TSLint issues.
2018-03-21 07:18:01 +01:00
1cbb1e8d0d feat(webpack): mark the CSS type for stylable views explicitly (#5257)
We want webpack's uglification to mangle function and class names
but that's what the current implementation of the CSS in {N} relys on
to get the CSS type for each view when targeted by CSS type selectors.

The implementation is changed a little so now the CSS type can be set
directly on the prototype of each View class or for TS, through decorator.

BREAKING CHANGES:


Extending classes requires marking the derived class with @CSSType
The root classes are not marked with CSSType and classes derived from ViewBase and View
will continue to work as expected. More concrete view classes (Button, Label, etc.) are
marked with @CSSType now and store their cssType on the prototype suppressing the previous
implementation that looked up the class function name. So clien classes that derive from one of
our @CSSType decorated classes will now have to be marked with @CSSType.
2018-03-12 16:34:25 +02:00
4bcb9840c1 Expose itemIdGenerator that can be used to generate unique ID for items on ListView (#4964)
* fixed the context of the getItem() call in android's ListView adapter (#4962)

* added itemIdGenerator function to the list-view interface to allow delegating the creating of a unique id for an item to a consumer of the listview (#4962)
2017-12-05 11:53:32 +02: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
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
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
25849a1425 implement get/set for selectedBackgroundColor property (#4039)
* implement get/set for selectedBackgroundColor property

* list-view separator color exposed through style

* Style androidStatusBarBackground exposed on Page
2017-04-21 17:57:25 +03:00
e6250e718a Disable recycling of native views
createNativeView will set iOS nativeView if it is null/undefined
2017-03-28 18:08:59 +03:00
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
291207fa36 FIX: Be able to bind list view.items to string 2017-03-20 17:21:40 +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
87f936bcd8 Fix: ListView not showing first items of VirtArray 2017-02-09 16:55:28 +02:00
fec5e92dbe Fix tracing 2017-01-16 13:29:46 +02:00
a65a491de6 fix listview (#3493) 2017-01-16 10:55:26 +02:00
7931ecd4f8 Fix tslint errors 2016-12-21 17:42:31 +02:00
6cfbaae947 Add 'auto' and number to the PercentLength and Length types 2016-12-19 15:53:01 +02:00
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
07e2102c5d restore properties deleted with merge 2016-12-13 15:51:18 +02:00
1202cb7288 almost all without layouts 2016-12-13 15:51:18 +02:00
a64847ca9d next 2016-12-13 15:51:18 +02:00
0f45a0df5e list-view progress 2016-12-13 15:51:18 +02:00
1343aa52a4 separatorColor property of ListView can be set in CSS 2016-12-02 17:43:42 +02:00
e28148c929 ListView item template selector refactoring + sample code 2016-10-17 17:22:30 +03:00
cd6039ce6c ListView item template selector 2016-10-17 09:32:47 +03:00
22608011f2 Avoid excessive requestLayout calls (#2270)
Added View.isLayoutRequired - to check if Layout call is needed after a measure call. Use in list-view.
Measure pass now get all its properties from nativeLayoutParams property instead of using instance dependency properties (e.g. perf improvement).
List-view now layouts cells only if there is need to.
List-view now measure rows with the specified rowHeight.
2016-06-08 15:41:30 +03:00
e135c20b14 Rename the files 2016-05-26 14:30:25 +03:00