然后容器内的gridview无法拖动GridViewscroll滚动 父容器子容器

解决方案 »

  1.   

    看了农民伯伯的文章activity group的应用,然后自己试着做了下,但是出现了问题
      

  2.   

    http://www.cnblogs.com/over140/archive/2010/09/07/1820876.html
      

  3.   

    android:measureAllChildren="true"
    再试试吧
      

  4.   

    按照下面的方法试试
    final ScrollView sv = (ScrollView) findViewById(R.id.scroll_layout);
    mGridView.setOnTouchListener(new OnTouchListener() {//避免嵌套滚动view的touch事件冲突
    @Override
    public boolean onTouch(View v, MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP)
    sv.requestDisallowInterceptTouchEvent(false);
    else
    sv.requestDisallowInterceptTouchEvent(true);
    return false;
    }
    });
      

  5.   

    啊,谢谢了,我后来发现我没有什么需要滚动的,就将scroll换成LinearLayout了,然后测试成功了
      

  6.   

    按照下面的方法试试
    final ScrollView sv = (ScrollView) findViewById(R.id.scroll_layout);
    mGridView.setOnTouchListener(new OnTouchListener() {//避免嵌套滚动view的touch事件冲突
    @Override
    public boolean onTouch(View v, MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP)
    sv.requestDisallowInterceptTouchEvent(false);
    else
    sv.requestDisallowInterceptTouchEvent(true);
    return false;
    }
    });谢谢了,这个方法我搜藏了,谢谢你的回复,论坛因你们而更精彩!!!