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.
-
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).
-
use “FragmentManager” property instead.