Devlight / InfiniteCycleViewPager

Infinite cycle ViewPager with two-way orientation and interactive effect.
Apache License 2.0
5.75k stars 831 forks source link

How to stop click events from happening fragments other than the current one in focus? #30

Open Vidxyz opened 8 years ago

Vidxyz commented 8 years ago

First of all thanks for this amazing library. However, I noticed that due to parts of the left and right fragment being visible apart from the one currently in focus, some of my click listeners on elements on these side fragments get fired if the user accidentally touches the right thing.

Is there any way to disable interaction with fragments that are not currently in focus so as to avoid this issue?

Thanks

mhussien86 commented 8 years ago

I made workaround for alike issue by putting a transparent empty layout and setOnclick listener to do nothing :) tell me if this solves your issue.

Vidxyz commented 8 years ago

Could you elaborate on your work around? I'm not quite sure I understand fully how to implement what you said. Thanks :)