ITC-Sample Project: How to make itc_pageview occupy full screen height ?

In ITC-Sample Project, there is a itc_pageview component in res/layout/ict_main.xml which current occupies approximately 70% of the screen size. I changed visibility of itc_recognitiontextview to gone and now I want ict_pageview to occupy full screen height. No matter what property I set, I am unable to do it. Request you to please help me over it.


If you comment the 'onMeasure' methods in srccommyscriptatkitcsampleviewPageView.java and set android:visibility of the “itc_recognitiontextview” to 'gone', you will able to write in full screen mode.
As this method allows to manage device rotation for a square area, you may have to develop your own method to achieve this.
Hope it helps!
Best regards

Thanks for the info. But what I did was to use FrameLayout in the xml instead of using PageView which is a custom FrameLayout implementation. As of now, it is working fine.

Hey Cate,

I am running into another problem.In the full screen mode, when I check Show guidelines from menu, the guidelines do not cover full screen.it covers approx 75% of the screen leaving space at the bottom. Can you bail me out of this please ?

Thanks for sharing this tip. Once again, this Sample has not been designed to manage the device rotation of the entire screen area. It seems that some other changes need to be done.

For the guidelines, you need to modify how the number of guidelines is calculated in portrait mode in the `public void onMeasure(int widthSpec, int heightSpec)' method in:
For each view, you might have to adapt the code in the related java file (Pageview.java, SmartStrokeLayoutView.java, ..)
Best regards

Thanks again. Will incorporate the necessary changes need to be done.

One more thing. I downloaded your MyScript Smart Note application from Google Play Store . This app primarily uses your Interactive Text Component, Right ?

If yes, then how come I have noticed that your MyScript Smart Note app is more seamless and responds well to gestures as compared to your itc-sample app available in MyScript Application Toolkit downloads ? Do Correct me if I am wrong.

You are almost right. Interactive Text component could have been the component used to develop MyScript Smart Note, but this application was based at the beginning on an older component and several years of additional developments.

I hope it is more clear for you. We do our best to provide development tool kit easy to integrate, but today we are aware of the gap between the ITC component and our note-taking application. That's why you can notice different behaviors and features.
Best regards

I got your point. My requirements does not need all the advanced features and behaviors that your note taking application offers. But at least the basic functions mentioned in your ITC Component Docs should perform as per expected. As of now, I am facing problems in Editing gestures (erase, join, insert, overwrite, underline, selection, single tap). While overwrite does not works at all(It inserts the character to be overwritten next to the target but does not erases the target ), other gestures such as erase are not that seamless. Can you please throw some light on it ? Will really appreciate your help in this.

I am surprised by the behavior you mentioned. In the ITC sample, gestures are enabled by default and it works quite well on my side. 'Overwrite' gestures also depends on the context and there are two settings to enable or disable, enable the gesture allows the sample to detect overwrite gestures and the default processing allows to delete the overwritten character.
Could you please check the 'GestureManager.java' file of the sample?

  private void configureGestures()
// Initialize the gesture configuration array with 8 gesture type entries
mGesturesConfig = new boolean[8][2];

// Configure each gesture requested behavior for application start
// Insert gesture
mGesturesConfig[0][0] = true;
mGesturesConfig[0][1] = false;
// Join gesture
mGesturesConfig[1][0] = true;
mGesturesConfig[1][1] = false;
// Erase gesture
mGesturesConfig[2][0] = true;
mGesturesConfig[2][1] = true;
// Overwrite gesture
mGesturesConfig[3][0] = true;
mGesturesConfig[3][1] = true;
// Single tap gesture
mGesturesConfig[4][0] = true;
mGesturesConfig[4][1] = false;
// Selection gesture
mGesturesConfig[5][0] = true;
mGesturesConfig[5][1] = false;
// Underline gesture
mGesturesConfig[6][0] = true;
mGesturesConfig[6][1] = false;
// Return gesture
mGesturesConfig[7][0] = true;
mGesturesConfig[7][1] = false;

// Initialize gestures behavior in the PageInterpreter
for (int i = 1; i <= mGesturesConfig.length; ++i)
mPageInterpreter.setGestureEnabled(i, mGesturesConfig[i-1][0]);
mPageInterpreter.setGestureDefaultProcessing(i, mGesturesConfig[i-1][1]);

Please let us know if it helps!

Thanks for the guidance Kate. I will help myself with it.

Does “itc_pageview” component supports android:hint= component that android EditText supports ? I want to achieve a functionality in which there would be hint like text present in the itc_pageview component and it will disappear once user writes something on that component. Is it possible to achieve ?

Indeed the page view is not an EditText Android component. However, there is another method to achieve this (a bit more complicated) setting the 'hint value' to the WordFactory createTypesetWordsFromLabel API. You could then display the result of this call into the page view and as soon as the user starts writing you could erase the page view (call the erase method at 'onDrawBegin' event from OnDrawListener in the InkCaptureView).
I hope it will help you.
Best regards

Login or Signup to post a comment
  • Support
  • Forums
  • Text
  • ITC-Sample Project: How to make itc_pageview occupy full screen height ?