问题出现的原因是因为ScrollView中子布局的的焦点的变化导致ScrollView自动的滑动 。所以解决方法就是让ScrollView中的最外层子布局焦点固定。

 <ScrollView        android:id="@+id/scrollView1"        android:layout_width="match_parent"        android:layout_height="match_parent" >        <LinearLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:orientation="vertical"            android:focusable="true"            android:focusableInTouchMode="true">        LinearLayout>ScrollView>

在LinearLayout中加入
android:focusable=”true”
android:focusableInTouchMode=”true”
便能解决问题。

更多相关文章

  1. android 常见布局及控件的属性详解
  2. Android布局动画之animateLayoutChanges与LayoutTransition
  3. Android布局详解
  4. Android一些关于分辨率和布局的设置
  5. android的五大布局详解
  6. android 使用Activity类布局时怎样让图片居中
  7. 创建android逐帧动画的两种方式 布局和java代码
  8. Android五大布局(二)——RelativeLayout、TableLayout 和AbsoulteL

随机推荐

  1. 跟踪PHP中的登录用户
  2. php连接mssql两种方法(com &amp; pdo)
  3. 本机PHP函数将授予我直接访问字符串部分
  4. php多进程处理
  5. 基于MySQL查询的Laravel路由
  6. 【实战】如何通过html+css+mysql+php来快
  7. 在使用PHP编程时,使用存储过程还是硬编码S
  8. 如何在php / mysql中使用事务
  9. Zend Studio-8.0.0中文汉化教程及入门教
  10. 使用php codeigniter进行Mysql数据库同步