0

I have small area of screen where I put ViewPager. While I scroll ViewPager from inside of its area it works fine. But when my finger move beyond the bounds then scrolling is intercepted. This occurs on Android version lower then 4.2. On Android 4.2 scrolling keep on even if the touch was outside the bounds of ViewPager.

How can I fix this bug?

4

1 に答える 1

3

ViewPagerのtouchイベントをオーバーライドし、ACTION_DOWNイベントでを呼び出しrequestDisallowInterceptTouchEvent(true)、ACTION_UPでfalseに戻すことができます。

これにより、ViewPagerでタッチイベントを開始した後、他のビューがタッチイベントをインターセプトできないようにする必要があります。

于 2013-02-15T09:22:36.517 に答える