Show custom error view

Product: Android

Product Version: 9.2.3

Please give a brief summary of your issue:
Want to show custom error view onTabError

Please describe your issue and provide steps to reproduce it:
We have a custom error view that we would like to display if there is an error in loading the PDF. We are using the PdfViewCtrlTabHostFragment2 and we get the error from onTabError. We do not want to use a dialog error, we just want to replace the red section with an error view.

Our current workaround is this:

` override fun onTabError(errorCode: Int, info: String?) {

    mBottomBarContainer.visibility = View.GONE

    val currentFragment: PdfViewCtrlTabBaseFragment = this.currentPdfViewCtrlFragment

    val textView = TextView(context).apply { setText("Hello world") }

   (currentFragment.view?.parent as? DispatchFairInsetsFrameLayout)?.addView(textView)
}

`

but that seems like it could be prone to errors or issues with managing the document. Do you have a better way to provide an error view to be used?

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

Hi,

Is there an issue with your current work around? What types of errors you are seeing?

Thanks,
Andrew.

There are no issues with it so far. We worried about adding views directly to your code may affect things you are doing in the background. If this is a good workaround, then great!

Hi,

This workaround should be fine. Adding views to the parent should not affect the functionality of our viewer. Are there any further concerns with the custom error view you are adding?

Thanks,
Andrew.

Nope, we will go with this. Thanks!