How to add a Button/view above on PdfViewCtrl overlayview?

Product:Android PDFTronSDK

Product Version:Demo

Please give a brief summary of your issue:How to add a Button/view above on PdfViewCtrl overlayview?
(Think of this as an email subject)

I am trying to add a view above on PdfViewCtrl. View is not visible.
Here is the code sample,

val view = View(requireContext())
val pagePos = mPdfViewCtrl!!.convScreenPtToPagePt(point.x, point.y)
val param = LinearLayout.LayoutParams(100,100)
view.layoutParams = param
view.x = pagePos[0].toFloat()
view.y = pagePos[1].toFloat()

Please help what i need to make correction?
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

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:



I have tried without any position & opted for Gravity centre. I am failing to add view over PsdViewCtrl class.

Any help, how could i resolve this?

Thank you.

Hi Manoj,

Thanks for contacting us.
Could you please try the following guide for adding a custom relative layout?

Also, a sample is available at this repository:

Could you please give it a try?

Best regards,