3

I need to remove a fragment that comes onto screen with a custom transition from top.

This fragment contains a ScrollView. While the user drags the ScrollView I need the ScrollView to intercept the touches.

If the ScrollView reaches it's end and the user continues the drag, I don't need to remove the fragment in this case.

This is an illustration of the draggable layout I created (when the user touches the red or the green part the fragment should stay in place, only when he drags the blue part the fragment should be dragged up and finally dismissed or dismissed on fling action):

enter image description here

Only if the user drags the fragment at certain lower portion of it (It's bottom part) then I should drag the fragment until I remove it entirely from screen and then I should remove it from stack as well.

I tried to implement Dragger and AndroidSlidingUpPanel, but the result is not exactly as I want it. the view is dragged from all places and not only from the region I predefined and in sliding panel the view is being dismissed when the scrollview ends.

How can I achieve this behavior?

halfer
  • 18,701
  • 13
  • 79
  • 158
Emil Adz
  • 38,699
  • 35
  • 127
  • 177
  • You will have to define a range to listen to dragging around only that area. But I guess you've already thought about it. If you tell us what you've done, maybe we could offer some suggestions. :) – Sufian Oct 03 '16 at 13:40

0 Answers0