TtPopOver
A transient view with custom content which appears above other content onscreen. It can show additional content such as context menus or content that does not easily fit into the UI. It can be opened from any component. If it is desired that the TtPopOver should be positioned relative to the component responsible for opening it, this component should be passed as the anchorView
parameter the show method. The TtPopOver is displayed above all other views in the application. Only a single TtPopOver can be displayed at any given time.
Parameters
The FragmentManager to be used when showing or dismissing the TtPopOverDialogFragment.
The LifecycleOwner to be used to provide the lifecycle of the TtPopOverDialogFragment.
The ViewModelProvider to be used to provide the TtPopOverViewModel instance.
The resource ID of the animation to execute when the TtPopOver is shown.
The resource ID of the animation to execute when the TtPopOver is dismissed.
The action to perform when the TtPopOver is dismissed.
The action to perform when the user taps outside of the TtPopOver.
Constructors
A convenience constructor to create a TtPopOver given a parent FragmentActivity.
Types
An interface for listeners that wish to be notified when a TtPopOver is dismissed.
An interface for listeners that wish to be notified when the user taps outside the TtPopOver.
The position to display the TtPopOver relative to the position of its anchor view.
Functions
Dismiss this TtPopOver. onPopOverDismissedListener will be invoked if assigned.
Populates the TtPopOver with the contentFragment and displays it, using the value of positionRelativeToAnchor to determine the position relative to the anchorView. The optional offsetXRelativeToAnchor and offsetYRelativeToAnchor parameters can be used to adjust the horizontal and vertical position of the TtPopOver, for example, to prevent the TtPopOver overlapping the edge of the screen or to avoid overlapping a particular component.