Ability to disable/lock the android ViewPager scroll from props#5968
Ability to disable/lock the android ViewPager scroll from props#5968kevinejohn wants to merge 10 commits intofacebook:masterfrom kevinejohn:viewpager-scroll-enabled
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 https://github.com/kevinejohn/react-native/commit/aa8ad2f58011f0fc88b7ed90bb5ebdecd6e3a945 |
| onPageScrollStateChanged={this.onPageScrollStateChanged} | ||
| ref={viewPager => { this.viewPager = viewPager; }}> | ||
| {pages} | ||
| </ViewPagerAndroid> |
There was a problem hiding this comment.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
space-infix-ops: Infix operators must be spaced.
There was a problem hiding this comment.
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. |
| @@ -154,6 +158,7 @@ public boolean onTouchEvent(MotionEvent ev) { | |||
| if (!mScrollEnabled) { | |||
| return false; | |||
| } | |||
There was a problem hiding this comment.
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.
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?