Android Open Source - TechDissected Pk Drawer Layout

From Project

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.

Java Source Code

package com.pkmmte.techdissected.view;
//from  ww w  . j  a v  a2s . c  om
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class PkDrawerLayout extends DrawerLayout {
  public PkDrawerLayout(Context context) {

  public PkDrawerLayout(Context context, AttributeSet attrs) {
    super(context, attrs);

  public PkDrawerLayout(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

  public boolean onInterceptTouchEvent(MotionEvent event) {
    try {
      return super.onInterceptTouchEvent(event);
    } catch (Exception e) {
      return false;

  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);

Java Source Code List