How to enable toolbar all the time?

Product:
PDFtron android SDK
Product Version:
Version 9.2.3 (June 1, 2022)
Please give a brief summary of your issue:
(Think of this as an email subject)
I want to ensure that ‘Toolbar’ should never hide while tapping (single tap or double tap) on doc viewer.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Currently when user taps on doc viewer the ‘Toolbar’ gets hide, even after adding the ’ autoHideToolbarEnabled’. Also i could see that particular code is deprecated, in that case what will be the alternative solution to handle the same ? Kindly help.

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:

Guides:APIs:Forums:

Hi,

Could you try permanentToolbars(boolean) in the ViewerConfig and let us know if this solution works for you?
Please see sample Java code below:

        ViewerConfig viewerConfig = new ViewerConfig.Builder()
                .permanentToolbars(true)
                .build()

Best,
Eamon

@emallon , thanks,this is working
Also, can you help me with the function to permanently hide the toolbars?
My use case is to only display the pdf no need of any toolbar.

Hi,

Could you try showAppBar(boolean) in the ViewerConfig.
This should hide the app bar for you.

ViewerConfig viewerConfig = new ViewerConfig.Builder()
                .showAppBar(false)
                .build()

Please let us know if this works for you.

Best,
Eamon

thanks @emallon , working as expected.

Hi. How do i call .showAppBar(false) directly in the ‘PdfViewCtrlTabFragment2’ instead of calling ViewerConfig viewerConfig = new ViewerConfig.Builder() .showAppBar(false) .build().

I have use case of hiding the toolbar after loading the ‘PdfViewCtrlTabFragment2’. Please help.

Hi,

Could you try the following sample Java code to hide the app bar and the annot toolbar?

  @Override
    public void onTabDocumentLoaded(String tag) {
        mPdfViewCtrlTabHostFragment2.getToolbar().setVisibility(View.GONE);
        mPdfViewCtrlTabHostFragment2.setAnnotationToolbarVisible(false, false);
    }

Please let us know if this works for you.

Best,
Eamon