Any idea for how I can make undo - redo feature for my app?
I am using ITC atk for android.
I can't find any sample that have this feature.
The undo/redo feature is not available at the level of the ITC APIs today. However it could be part of the next releases as we are still working on such features.
Anyway, if you want to invest some time to develop this feature, the basic way to achieve it would be to compute the difference between two successive states of the SmartPage content.
It means that you should compare the SmartWord, the SmartStroke and all the relevant information for you on the SmartPage and group those information that would represent a transition in your undo/redo sequence. Design patterns such as Command (http://en.wikipedia.org/wiki/Command_pattern with java example) or Memento (http://en.wikipedia.org/wiki/Memento_pattern with java example) could help as well.
I hope this will help you in your integration. Best regards.
Thank you very much for your support.
Can you tell me when are you waiting to have undo-redo and eraser features available?
Rest assured, that we will update this post as soon as we will have news about such features.
Thanks for your response.
I am looking for solution about undo-redo feature.
I think its complicated to manage strokes and words, so I decided to keep one stack with smartPages.
My stack updating in
public void inkChange(final SmartPage smartPage, final List<SmartStroke> addedStrokes, final List<SmartStroke> removedStrokes)
When I press undo button I am trying to replace the current smartPage with the previous one.
My problem is that I cant delete the current smartPage.
Delete() method of smartPage looks that not working...
Any tip for this?
Sorry for the delay, Kyriakos. About the Undo/Redo feature, we don't recommend this solution that could cause performance and footprint issue on the device.
We understand that our previous suggestion looks very difficult, but it is currently the best way to reach your goal.