Вы можете обновить макет до
<pdftron.PDF.Tools.CustomRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="250dp"
android:layout_height="250dp"
android:id="@+id/container"
app:posX="50"
app:posY="150"
app:pageNum="1"
android:background="#33AFAFFF"
app:zoomWithParent="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_red_dark" />
</pdftron.PDF.Tools.CustomRelativeLayout>
Затем обновите код:
private void _pdfControl_DocumentLoad(object sender, System.EventArgs e)
{
var note = LayoutInflater.Inflate(Resource.Layout.pdf_custom_layout, _pdfControl);
var layout = note.FindViewById<CustomRelativeLayout>(Resource.Id.container);
layout.SetRect(_pdfControl, new pdftronprivate.PDF.Rect(50, 50, 300, 300), 1);
}
Обратите внимание, что все точки должны быть указаны в координате страницы.
Вы будете см .:
![enter image description here](https://i.stack.imgur.com/GV5mw.png)