For the complete documentation index, see llms.txt. This page is also available as Markdown.

List Container

The list container is a UI component that contains other components related to annotations and bookmarks.

List container to customize horizontal menu layout in Xamarin.Android

This tutorial only applies to Xamarin.Android. See Xamarin.iOS equivalent here .

The list container provides a horizontal layout to display the following items in separate tabs:

Show list container

The list container is implemented by the BookmarksDialogFragment class. To show this fragment in your activity, create a new instance of BookmarksDialogFragment by calling newInstance(). Afterwards, initialize your fragment by setting the PDFViewCtrl and an ArrayList of DialogFragmentTab:

DialogFragmentTab specifies the information about each tab including the type of class and the tab tag. Currently the following dialogs can be displayed within the bookmarks dialog:

Dialog
Type of class
Tab tag

Annotation list

AnnotationDialogFragment.class

TAG_TAB_ANNOTATION

Document outline

OutlineDialogFragment.class

TAG_TAB_OUTLINE

User bookmark list

UserBookmarkDialogFragment.class

TAG_TAB_BOOKMARK

The following example shows how to display an annotations list, a document outline, and a user-defined bookmark list tabs in BookmarksDialogFragment:

Customization

The BookmarksDialogFragment provides a flexible API for displaying only the desired child view. Any of the annotation list, document outline, or user-defined bookmark list view can be removed by omitting them from the DialogFragmentTabs.

List container to customize horizontal menu layout in Xamarin.iOS

This tutorial only applies to Xamarin.iOS. See Xamarin.Android equivalent here .

The PTNavigationListsViewController class is a container view controller that shows the annotation list, document outline, and user-defined bookmark list controls with a UITabBarController-like interface. A segmented control is used to select which child view controller to display.

The navigation lists control is part of the Tools library, so make sure you have added the Tools library to your project.

Show a navigation lists view controller

To create a new navigation lists view controller and display it from another view controller, set the child list view controllers to the PTNavigationListsViewController class's ListViewControllers property:

Presenting on iPads:

The navigation list view controller is designed to be presented in a popover on iPads. To do so, you must provide the PTNavigationListsViewController's PopoverPresentationController with either:

OR

as in the example above.

Customization

The PTNavigationListViewController provides a flexible API for displaying only the desired child view controllers. Any of the annotation list, document outline, or user-defined bookmark list view controllers can be removed by omitting them from the listViewControllers property. It is also possible to add a custom child view controller by adding it to the listViewControllers array.

To specify which of the child view controllers to display on opening the navigation list control, either the SelectedIndex , or the SelectedViewController property can be used.

Last updated

Was this helpful?