Error when trying to reference bookmarkDlg in our project

6 views
Skip to first unread message

Ryan

unread,
Oct 3, 2016, 4:09:06 PM10/3/16
to PDFTron PDFNet SDK
Question:

I am using Xamarin.Android.

We get an error stating that the SupportFragmentManager cannot be resolved and that is because the renderer does not implement the fragmentactivity. 

BookmarkDlg bookmarkDlg = new BookmarkDlg(pdfViewCtrl.Doc);
bookmarkDlg
.onBookmarkSelected += bookmarkDlg_onBookmarkSelected;

bookmarkDlg
.Show(view.SupportFragmentManager,  "bookmarks");

Answer:

You need to do one of the following to correct your project.

1. change your Activity's base type to "FormsAppCompatActivity" (please note only appcompat version of the activity has SupportFragmentManager see: https://developer.android.com/reference/android/support/v4/app/FragmentManager.html).

2. use "FragmentManager" property instead.
Reply all
Reply to author
Forward
0 new messages