ScrollView与ListView的焦点问题,互相滑动互不影响
来源:互联网 发布:浙师大行知学院专业 编辑:程序博客网 时间:2024/05/10 10:22
//布局<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="${relativePackage}.${activityClass}" android:id="@+id/scrollView" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <com.example.test_listview.MyListView android:id="@+id/mylist" android:layout_width="fill_parent" android:layout_height="fill_parent" ></com.example.test_listview.MyListView> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="你猜猜"/> </LinearLayout> </ScrollView>
//代码ScrollView scrollView=(ScrollView) findViewById(R.id.scrollView);listview.setOnTouchListener(new OnTouchListener(){ @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub if(event.getAction()==MotionEvent.ACTION_UP){ scrollView.requestDisallowInterceptTouchEvent(false); }else{ scrollView.requestDisallowInterceptTouchEvent(true); } return false; } });
0 0
- ScrollView与ListView的焦点问题,互相滑动互不影响
- 横向滑动和纵向滑动互不受影响的ScrollView
- ScrollView嵌套ListView 两者滚动互不影响
- 关于ScrollView中嵌套listview焦点滑动问题 解决
- 关于ScrollView中嵌套listview焦点滑动问题 解决
- 关于scrollView中嵌套的ListView或者自定义view的焦点滑动问题
- ScrollView中若嵌套有滑动的控件(如:WebView,ListView或GridView)焦点问题
- ScrollView与Listview嵌套使用时的滑动冲突问题
- ListView与ScrollView滑动冲突问题
- ScrollView、SwipeRefreLayout、ListView的滑动冲突问题
- listview上下滑动与item的viewpager左右滑动时的焦点切换问题
- ListView与ScrollView的滑动冲突解决方法
- 解决ListView与ScrollView的滑动冲突
- 解决ScrollView 与 ListView 的滑动冲突
- ScrollView与ListView 的滑动冲突
- ScrollView中若嵌套有滑动的控件(如:WebView,ListView或GridView)时的焦点问题
- 解决scrollView嵌套viewpager+listview,scrollview不能滑动的问题
- Dialog 焦点问题,ListView 与 CheckBox 的焦点问题
- 子线程执行scheduledTimer
- C#绘制三角形以及旋转
- pgsql和mysql外键差异 2016.04.14回顾
- iOS被打回
- 长时间对着电脑眼睛会收到很大辐射教你五种对付方法
- ScrollView与ListView的焦点问题,互相滑动互不影响
- UITrackingRunLoopMode实例
- Spring中注解标签的解释
- 微信消息界面的实现
- 【补充】background-position
- JAVA的继承初始化
- hihocoder 1123 好配对 (二分)
- 解决win7的ie8浏览器以管理员身份运行,才不会崩溃的方法
- C#实现3D三角形 顶点转换以及投影