Android resolves the uplink/downlink slide conflict between the GridView and ScrollView, and gridviewscrollview
Both ListView and GridView can be implemented in this way.
Package com. sd. medical. views; import android. content. context; import android. util. attributeSet; import android. view. motionEvent; import android. widget. gridView; public class MyGridView extends GridView {public MyGridView (Context context) {super (context);} public MyGridView (Context context, AttributeSet attrs) {super (context, attrs ); // TODO Auto-generated constructor stub} @ Override protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec) {int expandSpec = MeasureSpec. makeMeasureSpec (Integer. MAX_VALUE> 2, MeasureSpec. AT_MOST); super. onMeasure (widthMeasureSpec, expandSpec);} @ Overridepublic boolean dispatchTouchEvent (MotionEvent ev) {if (ev. getAction () = MotionEvent. ACTION_MOVE) {return true;} return super. dispatchTouchEvent (ev );}}