[IOS/Android] Get the event when changing Toolbar Group Mode

Hi PDFTron,

I wanna know the event when changing Toolbar Group Mode (View, Draw, Annotate, …).
Can you give me the event on ios/android?

Thank you.

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:

Guides:APIs:Forums:

Hi there,

For iOS you can observe the PTToolGroupDidChangeNotification notification that is posted whenever the toolbar’s group changes: https://www.pdftron.com/api/ios/Constants/PTToolGroupDidChangeNotification.html

Hi,

For Android using the PdfViewCtrlTabHostFragment2 you can add a listener using addOnToolbarChangedListener.
Please see example below:

mPdfViewCtrlTabHostFragment2.addOnToolbarChangedListener(yourListener)

Best,
Eamon

Hi dluco and emallon,

Thanks for your support.
Recently, I use React Native to build PDFTron in my system. So, can you give me the event when changing Toolbar Group Mode (View, Draw, Annotate, …) in React Native language.

Thank you.

The PDFTron React Native wrapper library does not currently have an API for notifying when the toolbar group mode changes, but this is definitely something that we can consider adding as a feature request.

Hi @iris

The feature is now available in the latest version of the react native SDK version 3.0.2-beta.122

This API onCurrentToolbarChanged is called when the current toolbar is changed. Here’s the documentation:

Let us know if this works for you.

Thanks,
Sahil Behl