sv01 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_01); 
    sv02 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_02); 

    sv02.setOnTouchListener(new OnTouchListener() { 

        @Override 
        public boolean onTouch(View v, MotionEvent event) { 
            if (event.getAction() == MotionEvent.ACTION_UP) 
                sv01.requestDisallowInterceptTouchEvent(false); 
        else  
                sv01.requestDisallowInterceptTouchEvent(true); 

        return false; 
        } 
    }); 



重写onTouch()事件,在事件里通过requestDisallowInterceptTouchEvent(boolean)方法来设置父类的不可用,true表示父类的不可用

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-08-16
  • 2021-06-15
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-06-13
  • 2021-12-31
  • 2022-01-15
相关资源
相似解决方案