Android: ListView with Swipe inside ViewPager

前端 未结 1 830

I have an activity with a ViewPager that covers the whole activity. Inside this ViewPager is a ListView, that only covers the bottom part of the fragment. The ListView recog

相关标签:
1条回答
  • 2020-12-17 08:09

    My first idea is requestDisallowInterceptTouchEvent() may help you.

    public boolean onTouch(View v, MotionEvent e) {
        if(e.getAction() == MotionEvent.ACTION_DOWN){
           listItem.getParent().requestDisallowInterceptTouchEvent(true);
        }
    }
    
    0 讨论(0)
提交回复
热议问题