Customise Sub menu

Product: PDFtron Native Android SDK

Product Version:9.2.1

Please give a brief summary of your issue:
We followed PDFTron And customized the quick menu, we need to customize further submenu.

Please describe your issue and provide steps to reproduce it:
Add only opacity submenu item for tools_qm_appearance . We need to customize the submenu .
We created a quick menu using

val styleItem = QuickMenuItem(

Now how to customize the sub menu to add only the opacity parameter.
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:


Hi @anudeepj13 ,

You can remove quick menu entries using QuickMenu.removeMenuEntries as described here:

If this is not what you are looking for, please provide a UI mock for what you are trying to achieve so we can better assist.


Hi @Shirley_Gong we used QuickMenu.removeMenuEntries to remove the mFirstMenuItems , we need to remove some of sub items and show only Opacity item

You can hide items in style picker as described here:

Note this is a per-annotation setting so be sure to add for each annotation type you need to hide the opacity. Thanks.

we are adding toolbarbutton using

.addToolButton(ToolbarButtonType.IMAGE, DefaultToolbars.ButtonId.IMAGE.value())

What would be the corresponding Annot constant IMAGE I mean like e_Line for Line

1 Like

That would be Annot.e_Stamp However, keep in mind stamp annotation do not have any style properties.

Hi @Shirley_Gong
What is the mapping for ToolbarButtonType.ARROW

@anudeepj13 That would be AnnotStyle.CUSTOM_ANNOT_TYPE_ARROW

1 Like