How to get co-ordinates related to pdfdoc when i tap on the document?

Hi Andrew,

Thanks for the reply. I have removed setAnnot() & using setPagePosition() like
private fun addCustomViewWithAnnotation(pointArray:DoubleArray) {
val overlay = CustomRelativeLayout(requireContext(), mPdfViewCtrl!!, pointArray[0],pointArray[1],1)
overlay.background = resources.getDrawable(R.drawable.ic_issue_pin)
val param = RelativeLayout.LayoutParams(100, 100)
overlay.layoutParams = param
overlay.setZoomWithParent(false)
mPdfViewCtrl!!.addView(overlay)
}

I observed,

  1. The view position is still not updating with dragged new position.
  2. The co-ordinate of CustomRelativeLayout is not exact with touch point of PdfDocument. It seems the touch point is near to left-bottom of CustomRelativeLayout view.

I have attached video pls look into this.

Plz add some input/suggestion if i have done some wrong implementation.