2

I have a layout similar to this:

<FrameLayout> <ScrollView> <RelativeLayout> </RelativeLayout> </ScrollView> </FrameLayout> 

I want ScrollView to work normally with Vertical gesture(scroll/fling) and Pass horizontal gestures to it's parent(FrameLayout has Drag functionality and works fine without a ScrollView).

2 Answers 2

1

You need to create a new class extending FrameLayout and ovverriding onInterceptTouchEvents than you can perform your logic and decide which events must be sent to the scrollview and which ones must be handle inside the FrameLayout onTouchEvent

You can check the official documentation here

Sign up to request clarification or add additional context in comments.

Comments

0

You can try to overide onInterceptTouchEvent() to pass the touch event to its parent view. For your reference please go through this link https://developer.android.com/training/gestures/viewgroup.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.