Back to project page utexas-utilities.
The source code is released under:
Apache License
If you think the Android project utexas-utilities 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.mapsaurus.paneslayout; /*from www . j a v a2s . c o m*/ import android.content.Context; import android.support.v4.widget.SlidingPaneLayout; import android.util.AttributeSet; import android.view.MotionEvent; public class MySlidingPaneLayout extends SlidingPaneLayout { private boolean isShowingWebView = false; public MySlidingPaneLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (event.getX() > getWidth() / 9 && isShowingWebView && !isOpen() ) { return false; } return super.onInterceptTouchEvent(event); } public void setIsShowingWebView(boolean show) { isShowingWebView = show; } }