showLibraryInView

fun showLibraryInView(activity: Activity, binding: BooklibraryuiMainLayoutBinding, fragmentManager: FragmentManager, tabBarType: TabBarType = TabBarType.TOP, tabs: List<ITab> = Tab.defaultTabs, initialTab: ITab = Tab.FEATURED, featuredHeaderViewUpdater: FeaturedHeaderViewUpdater? = null, analyticsHostingTabTitle: String? = null)

Show the library in the view structure inflated by installBookLibraryView in the host activity.

installBookLibraryView must have been called first — pass its return value as binding. It inflates the library layout synchronously and primes the default resource providers, which is required so that restored child fragments find their container and so their bindings don't evaluate against unconfigured providers before this controller finishes initializing.

The fragmentManager should have no child fragments in it. In other words, if you're showing the library view in an empty fragment, pass the fragment's child fragment manager to the function.

Calling this function sets isLibraryVisible to true.

The default configuration uses TabBarType.TOP for a top tab bar, and the Tab.defaultTabs set of tabs.

You can show any tab in tabs as the initial tab by setting initialTab. Tab.FEATURED is the default value. If the given initialTab doesn't exist in tabs, Tab.FEATURED is shown.

Pass in uiConfiguration if you need to customize UI bits, such as the title in the library view.

Call onDestroyView when the view can be destroyed, which is primarily when destroying the host activity.