ActionBarProvider

Interface for providing custom action bars for views. Implementing this is optional.

Types

Link copied to clipboard
sealed interface Action

An action a view wants offered in its action bar, requested via Extras.actions.

Link copied to clipboard
sealed interface ButtonClick
Link copied to clipboard
class ExtraContents(val miniplayerView: BooklibraryuiMiniplayerBinding?, val miniplayerConfig: MiniplayerController.Config?)
Link copied to clipboard
data class Extras(val shareUrl: String? = null, val actions: List<ActionBarProvider.Action> = emptyList(), val hidesBackButton: Boolean = false)

What a view wants in its action bar beyond its id and title. See fi.richie.booklibraryui.fragments.ActionBarUpdatingFragment.actionBarExtras.

Properties

Link copied to clipboard

Listener for button clicks in the top bar. Implementations must provide ButtonClick.Back when the top bar's back button is clicked.

Functions

Link copied to clipboard
abstract fun actionBar(fragment: Fragment, id: Int?, title: String?, actionBarContainerView: ViewGroup, actionBarView: ViewGroup, extras: ActionBarProvider.Extras?): Single<ActionBarProvider.ExtraContents>?

Called when a view is ready to draw an action bar.

Link copied to clipboard
abstract fun onDestroyLibraryView()

Called when the library view is about to be destroyed.

Link copied to clipboard
open fun onDestroyView(actionBarContainerView: ViewGroup)

Called when the hosting fragment's view is about to be destroyed.