Code example for DrawerLayout

0
    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; 
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java