android禁止ScrollView内的控件改变之后自动滚动

最近遇到一android界面问题,在布局界面ScorllView中嵌套了几个 childView。其中有一个childview高度较高且超出了屏幕范围,当每个 childview都能获取焦点时,由于一屏显示不完,最下面的childview会自动滑动到最后

[html]  view plain  copy
 
  1. <ScrollView  
  2.        android:id="@+id/ScrollView"  
  3.        android:layout_width="match_parent"  
  4.        android:layout_height="match_parent"  
  5.        android:background="@color/white"  
  6.        android:overScrollMode="never"  
  7.        android:scrollbars="none" >  
  8.   
  9.        <LinearLayout  
  10.            android:layout_width="match_parent"  
  11.            android:layout_height="wrap_content"  
  12.            android:focusable="true"  
  13.            android:focusableInTouchMode="true"  
  14.            android:orientation="vertical" >  
  15. lt;span style="white-space:pre"> </span></LinearLayout>  
  16. </ScrollView>  

只用在LinearLayout里加2行代码就不会自动下滑了

[html]  view plain  copy
 
  1. android:focusable="true"  
  2. android:focusableInTouchMode="true" 

你可能感兴趣的:(scorllview)