Created
April 2, 2015 22:36
-
-
Save AKiniyalocts/6807b13faf0c5595bc60 to your computer and use it in GitHub Desktop.
Subclass of DrawerLayout to catch the crash on zoom when using PhotoView as a child
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.your.package; | |
import android.content.Context; | |
import android.support.v4.widget.DrawerLayout; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
public class HackyDrawerLayout extends DrawerLayout { | |
public HackyDrawerLayout(Context context) { | |
super(context); | |
} | |
public HackyDrawerLayout(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
public HackyDrawerLayout(Context context, AttributeSet attrs, int defStyle) { | |
super(context, attrs, defStyle); | |
} | |
@Override | |
public boolean onInterceptTouchEvent(MotionEvent ev) { | |
try { | |
return super.onInterceptTouchEvent(ev); | |
} catch (Throwable t) { | |
t.printStackTrace(); | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment