LambergaR / VerticalViewPager

Vertical implementation of Android ViewPager
MIT License
276 stars 134 forks source link

Vertical scroll for WebView inside Viewpager #1

Closed Sash0k closed 11 years ago

Sash0k commented 11 years ago

Hello, thanks for library. But I have a WebView inside VerticalViewPager, and its scroll starts to work only after horizontal move. If I try vertical move, pager changes page, but not WebView's content scrolls.

Sash0k commented 11 years ago

at canScroll() method i see

return checkV && ViewCompat.canScrollHorizontally(v, -dy);

trying to change it to canScrollVertically(v, -dy), but no effect.

Sash0k commented 11 years ago

found a problem: we need to use getHeight() here

    private boolean isGutterDrag(float x, float dx) {
        return (x < mGutterSize && dx > 0) || (x > getWidth() - mGutterSize && dx < 0);
    }