Back to project page mobilib.
The source code is released under:
MIT License
If you think the Android project mobilib 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.datdo.mobilib.widget; //from w w w . ja v a 2 s .c o m import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.ListView; public class MblListViewWithScrollableItems extends ListView { private Delegate mDelegate; public MblListViewWithScrollableItems(Context context) { super(context); } public MblListViewWithScrollableItems(Context context, AttributeSet attrs) { super(context, attrs); } public MblListViewWithScrollableItems(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (mDelegate != null && mDelegate.shouldNOTInterceptTouchEvent(event)) { return false; } return super.onInterceptTouchEvent(event); }; public static interface Delegate { public boolean shouldNOTInterceptTouchEvent(MotionEvent event); } public void setDelegate(Delegate delegate) { mDelegate = delegate; } }