问题出现的原因是因为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(安卓)GestureDetector手势识别类
  3. Android:使用ViewPager实现左右滑动切换图片 (简单版)
  4. Android使用ViewPager实现左右滑动效果
  5. android 禁止viewpager预加载
  6. Android(安卓)TextView setMovementMethod 滑动 背景
  7. android实战
  8. Android实现手势滑动(左滑和右滑)
  9. Android(安卓)activity 单手操作 滑动关闭

随机推荐

  1. 快速用ELK搭建日志收集平台
  2. SpringMVC源码分析:一个request请求的完整
  3. Redis系列八--Redis数据过期策略详解
  4. 《赢》——如何更好的管理团队
  5. redis系列1-入门
  6. Spring AOP @After,@Around,@Before执行
  7. spring aop源码分析
  8. Android(安卓)Studio如何删除module
  9. Spring 统一异常处理的方式
  10. Java线程池-当任务渐增时的处理-各个参数