Mastercard-Gateway/ink-android

Doesn't work when is inside ScrollView

joanebrown opened this issue · 3 comments

Hi,

I tried your plugin inside a long ScrollView, but the scroll doesn´t work, it is blocked.

Device: Samsumg Note 3.

Thanks for your amazing work!

Are you saying that it doesn't work when the inkview is visible within the scroll view? It sounds like the inkview isn't blocking the scroll, but rather capturing the touch events in order to draw the signature. The user would need to initiate the scroll from outside of the ink view . In this case it might be a bad decision to place an ink view inside of a scroll view.

I would also like to place an InkView inside a ScrollView. From basically it's a contract -- and at the bottom is the signature, which mirrors what would happen in real life. Except that the scroll view steals some of my strokes so the UX is bad when they are signing. Any ideas how to overcome?

OK, here's how I make mine work.

        InkView inkView = (InkView) findViewById(R.id.ink_view);
        inkView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                v.getParent().requestDisallowInterceptTouchEvent(true);
                return false;
            }
        });

This piece of code can be placed in activity.