Product Version: 9.0.3-beta07
Please give a brief summary of your issue:
How to Custom annotation tools bar UI?
In my project we have a specific requirement of having customised UI of toolbar.
Example icon action, font style, align of button switch annotation
Thanks for contacting us about this question.
The icon and color are styleable but the font style and alignment of the button switch are not.
If you need to change font and switch button alignment, you need to create your own toolbar.
The overflow menu is Android specific menu and is provided by system, usually apps should not change it. You may want to check with your design team to make sure they are aware of the platform convention.
The toolbar switcher icon is called “ic_arrow_down_white_24dp”, you will need a vector drawable replacement in your application
Thanks for contacting us about this question. The toolbar can be customized with a search icon if you provide a custom toolbar with the search as its first value. You can then add an event listener for it to trigger the Search functionality.
You can customize the toolbar with the provided links:
I have created an example project with these settings here:
Thanks for support.
I had customized icon search button.
Next step: How to make button switch annotation to center of view (center of toolbar) because is a requirement of my project. Please tell me how to can do it.
Looking forward to hearing from you as soon as possible.
Thanks!
I’ve updated the PDFTron React Native library to the latest Android snapshot version which includes API to help set the gravity of the toolbar items.
You can change the Annotation Toolbar item gravity by calling the following API in PdfViewCtrlTabHostFragment2.initViews() (as referenced in the GitHub sample sent previously):