-
Notifications
You must be signed in to change notification settings - Fork 25k
Ability to disable/lock the android ViewPager scroll from props #5968
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
Conversation
|
By analyzing the blame information on this pull request, we identified @mkonicek, @brentvatne and @kmagiera to be potential reviewers. |
|
You can test it in the UIExplorer example. You should also add an example that uses the prop in |
|
@kevinejohn updated the pull request. |
|
I updated the code syntax to match the recently added Android ScrollView scrollEnabled: |
|
@kevinejohn I personally wouldn't call the property |
|
Number of commits look wacky. |
|
Yeah I rebased to master and force pushed. Is there a better way to do that so it doesn't look funny on github? |
|
Was there an issue with the rebase? You can try |
|
@kevinejohn updated the pull request. |
|
If that doesn't do it you can try to create a new branch from master then |
|
@kevinejohn updated the pull request. |
|
I just did another rebase master and force push and it seems to be displaying properly now on github. Not sure why it didn't work the first time @astuetz good suggestion. I'll update it |
|
@kevinejohn updated the pull request. |
1 similar comment
|
@kevinejohn updated the pull request. |
|
@janicduplessis I just added tests to UIExplorer and its fully working |
| onPageScrollStateChanged={this.onPageScrollStateChanged} | ||
| ref={viewPager => { this.viewPager = viewPager; }}> | ||
| {pages} | ||
| </ViewPagerAndroid> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space-infix-ops: Infix operators must be spaced.
|
@kevinejohn updated the pull request. |
|
@janicduplessis Fixed. |
|
Does #5534 (merged) solve drawer locking? |
|
Any progress on this PR and will this be merged anytime soon? |
|
@kevinejohn I believe #5534 might have already solved this? Do you still plan to work on this PR? |
|
@mkonicek Isn't DrawerLayoutAndroid a completely different component then ViewPagerAndroid? If so this PR is still relevant |
|
@mkonicek: @kevinejohn is right, this PR is about locking a |
|
@kevinejohn Whoops! :) I read the title too quickly. |
|
I think |
|
@kevinejohn updated the pull request. |
|
@satya164 Just renamed it from "swipe" to "scroll" @angelahess You're right. This PR will just add the example now. |
|
@angelahess would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. |
| public boolean onTouchEvent(MotionEvent ev) { | ||
| if (!mScrollEnabled) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to add a check to mScrollEnabled at the start of the method, delete this check here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That check is needed for both methods:
onInterceptTouchEvent
onTouchEvent
|
@kevinejohn updated the pull request. |
|
@facebook-github-bot shipit |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
Summary: This is a nice feature to have. I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo? Closes facebook#5968 Differential Revision: D3240651 Pulled By: mkonicek fbshipit-source-id: 5f1d157216df4f3314915496188a92aec1b85e91
Summary: This is a nice feature to have. I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo? Closes facebook#5968 Differential Revision: D3240651 Pulled By: mkonicek fbshipit-source-id: 5f1d157216df4f3314915496188a92aec1b85e91
Summary: This is a nice feature to have. I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo? Closes facebook#5968 Differential Revision: D3240651 Pulled By: mkonicek fbshipit-source-id: 5f1d157216df4f3314915496188a92aec1b85e91
|
Hey, any updates about this? Was this ever merged? |
Summary: This is a nice feature to have. I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo? Closes facebook/react-native#5968 Differential Revision: D3240651 Pulled By: mkonicek fbshipit-source-id: 5f1d157216df4f3314915496188a92aec1b85e91
Summary: This is a nice feature to have. I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo? Closes facebook/react-native#5968 Differential Revision: D3240651 Pulled By: mkonicek fbshipit-source-id: 5f1d157216df4f3314915496188a92aec1b85e91
This is a nice feature to have.
I've tested this by copying and renaming the ViewPager java and javascript files from the react-native repo and including them in a project. Whats the best way to test this directly from the repo?