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

peekEnabled not woking in ViewPagerAndroid . #16158

Closed
PARAGJYOTI opened this issue Oct 1, 2017 · 4 comments
Closed

peekEnabled not woking in ViewPagerAndroid . #16158

PARAGJYOTI opened this issue Oct 1, 2017 · 4 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@PARAGJYOTI
Copy link

Is this a bug report?

Yes

Issue

The most awaited property 'peekEnabled' in ViewPagerAndroid is not working . I believe , this is an exciting feature for which most of developers been waiting for . Though its documented , it doesn't work . Even it's not showing in the 'autocomplete' feature in 'Visual studio code' (Normally it shows up as autoSuggestion when I start to type the prop) . I checked the props in js code , but the prop is there . But setting the property to true in main ViewPagerAndroid.android.js component also doesn't help . It's probably isn't implemented correctly in Native code . Are you guys having the issue ? Please let me know , I upgraded from 0.43 to 0.48 just to get this feature . Now its not here .

Environment

Platform - Android
Development Platform- Windows 10

Packages: (wanted => installed)
react-native: 0.48.4 => 0.48.4
react: 16.0.0-alpha.12 => 16.0.0-alpha.12

@stale
Copy link

stale bot commented Nov 30, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 30, 2017
@Noitidart
Copy link

May you please share the code that worked for you with/without peekEnabled. I actually can't even get a copy paste from docs of the ViewPagerAndroid to work - https://stackoverflow.com/questions/47584773/viewpagerandroid-doesnt-show-children

@stale stale bot closed this as completed Dec 8, 2017
@koox00
Copy link

koox00 commented Mar 10, 2018

Seems that peekEnabled to work as expected needs ViewPagerAndroid to have padding since it sets clipToPadding to false.

Looking at the source code, child views style is set to position: absolute and right,left,top,bottom: 0 so the parent's container padding has no effect.
example: peekEnabled not working

As a workaround I added a negative margin to pageMargin to achieve the same effect.
example: peekEnabled expected

--EDITED--
added snack examples

@Noitidart
Copy link

Interesting at @koox00 - may you please share some examples.

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants