Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(scrollview): add isScrollEnabled property #6640

Merged
merged 2 commits into from
Nov 30, 2018

Conversation

manoldonev
Copy link
Contributor

@manoldonev manoldonev commented Nov 30, 2018

Add ScrollView.isScrollEnabled property that should cover the majority of the scenarios that users try to address with isUserInteractionEnabled / isEnabled properties. This is a straightforward and consistent solution that does one thing and one thing only -- enable/disable scroll.

We have a known inconsistency in Android / iOS with respect to the isUserInteractionEnabled property and container components (e.g. scrollview, various layouts, etc.)-- in iOS when property is set to false on the container, it disables user interaction recursively on all subviews, while on Android it doesn't. As this is the standard behavior on each OS we decided not to streamline this:

  • on Android isUserInteractionEnabled false is basically equivalent to isScrollEnabled false (if we were to streamline the behavior for scrollview to match iOS counterpart, we would have to do the same for all layout containers too so for the time being we are "consistently inconsistent" -- consistent among Android components and inconsistent betwen Android and iOS)
  • on iOS isUserInteractionEnabled false disables scroll and also disables user interaction for all subviews.

Also, ScrollView.isEnabled property currently has no effect neither on Android, nor on iOS.

Fixes #6511
Depends on NativeScript/tns-core-modules-widgets#150 (merge after the widgets PR)

@manoldonev manoldonev self-assigned this Nov 30, 2018
@ghost ghost added the in progress label Nov 30, 2018
@manoldonev
Copy link
Contributor Author

test branch_tns_core_modules_widgets#mdonev/disable-scroll

@MartoYankov MartoYankov changed the title feat(scrollbar): add isScrollEnabled property feat(scrollview): add isScrollEnabled property Nov 30, 2018
@MartoYankov MartoYankov added the docs needed Additional documentation on this issue/PR is needed label Nov 30, 2018
@manoldonev manoldonev merged commit ae0fa90 into master Nov 30, 2018
@ghost ghost removed the in progress label Nov 30, 2018
@manoldonev manoldonev deleted the mdonev/disable-scroll branch November 30, 2018 15:18
@tsonevn tsonevn self-assigned this Jan 11, 2019
@tsonevn tsonevn removed the docs needed Additional documentation on this issue/PR is needed label Jan 11, 2019
@lock
Copy link

lock bot commented Jan 11, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot unassigned tsonevn Jan 11, 2020
@lock lock bot locked and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: isUserInteractionEnabled stopped controlling the ScrollView's behaviour
4 participants