这是监听不了的,listview和scrollview不能同时使用要使用必须设置listview不能滚动publicclassMyListViewextendsListView{publicMyListView(Contextcontext,AttributeSetattrs,intdefStyle){super(context,attrs,defStyle);//TODOAuto-generatedconstructorstub}publicMyListView(Contextcontext,AttributeSetattrs){super(context,attrs);//TODOAuto-generatedconstructorstub}publicMyListView(Contextcontext){super(context);//TODOAuto-generatedconstructorstub}@OverridepublicvoidonMeasure(intwidthMeasureSpec,intheightMeasureSpec){intexpandSpec=MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE>>2,MeasureSpec.AT_MOST);super.onMeasure(widthMeasureSpec,expandSpec);}