De-select annotation tool Programatically In Android

Product: PDFtron native android sdk

Product Version:9.2.1

Please give a brief summary of your issue:
Deselect annotation tool programatically.

Please describe your issue and provide steps to reproduce it:
After Done action, I need to deselect the previously selected annotation tool in android.
Kindly help with the Deselect option for android programatically.

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:



Thanks for contacting us. If you are using the fragment viewer (i.e. PdfViewCtrlTabHostFragment2 ) you can call the following code to deselect a tool:

         PdfViewCtrlTabHostFragment2 viewerFragment = ...;
            PdfViewCtrlTabFragment2 tabFragment = viewerFragment.getCurrentPdfViewCtrlFragment();
            if (tabFragment != null) {
                ToolManager toolManager = tabFragment.getToolManager();
                toolManager.setTool(toolManager.createTool(ToolMode.PAN, null));

Could you give this a try and let us know if this works for you?

Thanks this code is working as expected.