iink SDK on Device

Answered

multiple edit text blocks with scroll view

How to create multiple edit text blocks in form which have scroll view?


I tried this but when i add scroll view i cannot write anything, so i enable or disable scroll view on button click, then scrolling content was stable but then after also i cannot write anything.


Best Answer

Dear Mahendra,


Did yu try to proceed as we do in our code samples (you can play with the GetStarted), where we have several pointer types, PEN, TOUCH and AUTO.


When in PEN, you can only write. When in TOUCH, you can scroll. This is done in the "handleOnTouchForPointer" function of the "InputController.java file" of the "uireferenceimplementation":

...
    else if (inputMode == INPUT_MODE_FORCE_TOUCH)
    {
      iinkPointerType = PointerType.TOUCH;
    }
...
    if (iinkPointerType == PointerType.TOUCH)
    {
      gestureDetector.onTouchEvent(event);
    }
...



If you proceed this way, it should work fine.


Best regards,


Olivier


Answer

Dear Mahendra,


Did yu try to proceed as we do in our code samples (you can play with the GetStarted), where we have several pointer types, PEN, TOUCH and AUTO.


When in PEN, you can only write. When in TOUCH, you can scroll. This is done in the "handleOnTouchForPointer" function of the "InputController.java file" of the "uireferenceimplementation":

...
    else if (inputMode == INPUT_MODE_FORCE_TOUCH)
    {
      iinkPointerType = PointerType.TOUCH;
    }
...
    if (iinkPointerType == PointerType.TOUCH)
    {
      gestureDetector.onTouchEvent(event);
    }
...



If you proceed this way, it should work fine.


Best regards,


Olivier

Extremely sorry for misunderstanding with you, But my question is, when we add text block in scroll view we cannot write anything because text block also scrolls down, wright. So i disable scroll view and then try to write, at that movement my screen doesn't scrolls but even i cannot write anything. I shared video for reference.


Thank You

Regards

mp4

Dear Mahendra,


currently, this is more on Android issue than a MyScript issue.


We then invite you to refer to tutorials on the internet, that will explain how to make a view scrollable:

-https://www.tutorialspoint.com/how-can-i-make-my-layout-scroll-vertically-in-android

-https://guides.codepath.com/android/Working-with-the-ScrollView

-https://www.tutlane.com/tutorial/android/android-scrollview-horizontal-vertical-with-examples

-...


Best regards,


Olivier


Thanks for Replay,

Yes, Sir I goes through this example but in this example 50-50 % screen is divided there is no any extra scroll able part in it, Actually i want too many text blocks which in scroll able format like forms.

Dear Mahendra,


did you have a look to our exercise-assessment sample, that shows how to deal with multiple-fields: https://github.com/MyScript/interactive-ink-additional-examples-android/tree/master/java/samples/exercise-assessment ?


It should indeed be of help.


Best regards,


Olivier