FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(scrollview): add isScrollEnabled property by manoldonev · Pull Request #6640 · NativeScript/NativeScript · GitHub

feat(scrollview): add isScrollEnabled property - #6640

Merged
manoldonev merged 2 commits into
masterfrom
mdonev/disable-scroll
Nov 30, 2018
Merged

manoldonev merged 2 commits into
masterfrom
mdonev/disable-scroll

Conversation

manoldonev commented Nov 30, 2018 •
edited
Loading

Copy link
Copy Markdown
Contributor

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 self-assigned this Nov 30, 2018
ghost added the in progress label Nov 30, 2018

Copy link
Copy Markdown
Contributor Author

test branch_tns_core_modules_widgets#mdonev/disable-scroll

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

lock Bot commented Jan 11, 2020

Copy link
Copy Markdown

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 Bot unassigned tsonevn Jan 11, 2020
lock Bot locked and limited conversation to collaborators Jan 11, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL