Skip to content

Conversation

@kevinejohn
Copy link
Contributor

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?

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @mkonicek, @brentvatne and @kmagiera to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Feb 17, 2016
@janicduplessis
Copy link
Contributor

You can test it in the UIExplorer example. You should also add an example that uses the prop in Examples/UIExplorer/ViewPagerAndroidExample.android.js.

@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

@kevinejohn
Copy link
Contributor Author

I updated the code syntax to match the recently added Android ScrollView scrollEnabled:

82b0df9

@ghost
Copy link

ghost commented Feb 18, 2016

@kevinejohn I personally wouldn't call the property scrollEnabled, as usually when talking about a ViewPager I think most people use the word "swiping", not "scrolling". For our custom ViewPagers, we simply use private boolean locked;

@bestander
Copy link
Contributor

Number of commits look wacky.
Maybe rebase?

@kevinejohn
Copy link
Contributor Author

Yeah I rebased to master and force pushed. Is there a better way to do that so it doesn't look funny on github?

@janicduplessis
Copy link
Contributor

Was there an issue with the rebase? You can try git rebase --abort.

@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

@janicduplessis
Copy link
Contributor

If that doesn't do it you can try to create a new branch from master then git cherry-pick your commits from this branch and then force push it back here.

@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

@kevinejohn
Copy link
Contributor Author

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

@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

@kevinejohn
Copy link
Contributor Author

onPageScrollStateChanged={this.onPageScrollStateChanged}
ref={viewPager => { this.viewPager = viewPager; }}>
{pages}
</ViewPagerAndroid>

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.

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.

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.

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.

@facebook-github-bot
Copy link
Contributor

@kevinejohn updated the pull request.

@kevinejohn
Copy link
Contributor Author

@janicduplessis Fixed.

@mkonicek
Copy link
Contributor

Does #5534 (merged) solve drawer locking?

@cubbuk
Copy link

cubbuk commented Mar 15, 2016

Any progress on this PR and will this be merged anytime soon?
Thanks

@mkonicek
Copy link
Contributor

@kevinejohn I believe #5534 might have already solved this? Do you still plan to work on this PR?

@kevinejohn
Copy link
Contributor Author

@mkonicek Isn't DrawerLayoutAndroid a completely different component then ViewPagerAndroid? If so this PR is still relevant

@ghost
Copy link

ghost commented Mar 16, 2016

@mkonicek: @kevinejohn is right, this PR is about locking a ViewPager, not a DrawerLayout

@mkonicek
Copy link
Contributor

@kevinejohn Whoops! :) I read the title too quickly.

@satya164
Copy link
Contributor

satya164 commented May 8, 2016

I think scrollEnabled is better since there are other props like onPageScroll and onPageScrollStateChanged. Can you rebase to just add the example?

@ghost
Copy link

ghost commented May 9, 2016

@kevinejohn updated the pull request.

@kevinejohn
Copy link
Contributor Author

@satya164 Just renamed it from "swipe" to "scroll"
1b6a51a

@angelahess You're right. This PR will just add the example now.

@ghost
Copy link

ghost commented May 10, 2016

@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;
}
Copy link
Contributor

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

Copy link
Contributor Author

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

@ghost
Copy link

ghost commented May 11, 2016

@kevinejohn updated the pull request.

@angelahess
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 11, 2016
@ghost
Copy link

ghost commented May 11, 2016

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 31250ad May 11, 2016
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
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
bubblesunyum pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
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
mpretty-cyro pushed a commit to HomePass/react-native that referenced this pull request Aug 25, 2016
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
@kinging123
Copy link

Hey, any updates about this? Was this ever merged?

ferrannp pushed a commit to ferrannp/react-native-viewpager that referenced this pull request Feb 8, 2019
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
james-watkin added a commit to james-watkin/react-native-pager-view that referenced this pull request Dec 28, 2021
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 pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.