How to change the alignment of toolbar menu items?

PDFTron android SDK
Product Version:
Please give a brief summary of your issue:
(Think of this as an email subject)
I would like to align ‘Toolbar’ menu items to either left or right ?. Can you please help me to find some samples for the same ?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I have a use of changing the alignment of toolbar items, either left or right.

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

Kindly find the screenshot from my tablet device, as a reference.

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:



To achieve this you can use toolbarItemGravity in the ViewerConfig.Builder.
Please see sample Java code below for aligning the toolbar items to the left:

new ViewerConfig.Builder().toolbarItemGravity(Gravity.START)


thank you. it is working as expected.