Back to project page TechDissected.
The source code is released under:
Apache License
If you think the Android project TechDissected listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.pkmmte.techdissected.view; //from ww w . j a v a2s . c om import android.content.Context; import android.support.v4.widget.DrawerLayout; import android.util.AttributeSet; import android.view.MotionEvent; public class PkDrawerLayout extends DrawerLayout { public PkDrawerLayout(Context context) { super(context); } public PkDrawerLayout(Context context, AttributeSet attrs) { super(context, attrs); } public PkDrawerLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean onInterceptTouchEvent(MotionEvent event) { try { return super.onInterceptTouchEvent(event); } catch (Exception e) { return false; } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { widthMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY); heightMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY); super.onMeasure(widthMeasureSpec, heightMeasureSpec); } }