android scrollview组件禁止滑动的方法

 

xml配置:
          android:id="@+id/sc_freement"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:layout_below="@id/category_line"
android:scrollbars="none"
android:fadingEdge="none">
</<span style="line-height: 21px; ">ScrollView>
 
java代码控制:
ScrollView  scrollView = (ScrollView)this.findViewById(R.id.sc_freement);
scrollView.setOnTouchListener(new View.OnTouchListener(){
@Override
public boolean onTouch(View arg0, MotionEvent arg1) {
return true;
}
});
原文地址:https://www.cnblogs.com/exmyth/p/4523516.html