@@ -0,0 +1,1019 @@
+package uk.co.senab.photoview.sample;%0A%0Aimport android.content.Context;%0Aimport android.support.v4.widget.DrawerLayout;%0Aimport android.view.MotionEvent;%0A%0A/**%0A * Hacky fix for Issue #4 and%0A * http://code.google.com/p/android/issues/detail?id=18990%0A * %3Cp/%3E%0A * ScaleGestureDetector seems to mess up the touch events, which means that%0A * ViewGroups which make use of onInterceptTouchEvent throw a lot of%0A * IllegalArgumentException: pointerIndex out of range.%0A * %3Cp/%3E%0A * There's not much I can do in my code for now, but we can mask the result by%0A * just catching the problem and ignoring it.%0A * Created by John on 10/1/15.%0A */%0Apublic class HackyDrawerLayout extends DrawerLayout %7B%0A%0A    public HackyDrawerLayout(Context context) %7B%0A        super(context);%0A    %7D%0A%0A    @Override%0A    public boolean onInterceptTouchEvent(MotionEvent ev) %7B%0A        try %7B%0A            return super.onInterceptTouchEvent(ev);%0A        %7D catch (IllegalArgumentException e) %7B%0A            e.printStackTrace();%0A            return false;%0A        %7D%0A    %7D%0A%7D%0A

Create HackyDrawerLayout to demonstrate a fix for the onInterceptTouchEvent bug