fix(listview-ios): incorrect layout when scroll #6656
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes NativeScript/nativescript-angular#1626
Fixes #6628
Fixes #6573
During the first layout of the list view items, they have no window. On scroll when laying out the next items, they suddenly have a window. Maybe because of recycling. This is not the actual issue however. The problem is that for some reason the coordinates of these views in this window are negative, i.e. wrong. Not sure what is causing that.
The easiest and cleanest way to fix this would be to make the
iosOverflowSafeArea
property inherited and assign it asfalse
to the list view cell. However, we can't do this by design - containers and components must have different default values. So the next best thing is add a new property which can be inherited -iosOverflowSafeAreaEnabled
. Setting this tofalse
would disable the setting of the other property to the View and all its children.