TtPopOver

fun TtPopOver(parentFragment: Fragment, dismissWhenClickOutside: Boolean = false, @AttrRes entryAnimatorAttrId: Int? = R.attr.tt_popover_enter, @AttrRes exitAnimatorAttrId: Int? = R.attr.tt_popover_exit, shouldHidePlatformSystemUi: Boolean = false, onPopOverDismissedListener: TtPopOver.OnPopOverDismissedListener? = null, onPopOverTouchOutsideListener: TtPopOver.OnPopOverTouchOutsideListener? = null, automaticDismissTimeoutMs: Long? = parentFragment.requireContext().getIntegerByAttr(R.attr.tt_delay_duration_short_ms).toLong())

A convenience constructor to create a TtPopOver given a parent Fragment.

Parameters

parentFragment

The Fragment to be used to access the FragmentManager and LifecycleOwner used by the TtPopOver.

dismissWhenClickOutside

If true the TtPopOver will be dismissed when the user taps outside of the TtPopOver. If false the TtPopOver will remain on screen when the user taps outside of the TtPopOver.

entryAnimatorAttrId

The resource ID of the animation to execute when the TtPopOver is shown.

exitAnimatorAttrId

The resource ID of the animation to execute when the TtPopOver is dismissed.

shouldHidePlatformSystemUi

If true the status and navigation bars will be hidden while the TtPopOver is displayed. If false the status and navigation bars will be visible while the TtPopOver is displayed.

onPopOverDismissedListener

The action to perform when the TtPopOver is dismissed.

onPopOverTouchOutsideListener

The action to perform when the user taps outside of the TtPopOver.

automaticDismissTimeoutMs

The timeout in milliseconds after which to automatically dismiss the TtPopOver. Any user interaction with the TtPopOver will reset the timeout. If null then the TtPopOver will not be dismissed automatically.


fun TtPopOver(parentActivity: FragmentActivity, dismissWhenClickOutside: Boolean = false, @AttrRes entryAnimatorAttrId: Int? = R.attr.tt_popover_enter, @AttrRes exitAnimatorAttrId: Int? = R.attr.tt_popover_exit, shouldHidePlatformSystemUi: Boolean = false, onPopOverDismissedListener: TtPopOver.OnPopOverDismissedListener? = null, onPopOverTouchOutsideListener: TtPopOver.OnPopOverTouchOutsideListener? = null, automaticDismissTimeoutMs: Long? = parentActivity.getIntegerByAttr(R.attr.tt_delay_duration_short_ms).toLong())

A convenience constructor to create a TtPopOver given a parent FragmentActivity.

Parameters

parentActivity

The FragmentActivity to be used to access the FragmentManager and LifecycleOwner used by the TtPopOver.

dismissWhenClickOutside

If true the TtPopOver will be dismissed when the user taps outside of the TtPopOver. If false the TtPopOver will remain on screen when the user taps outside of the TtPopOver.

entryAnimatorAttrId

The resource ID of the animation to execute when the TtPopOver is shown.

exitAnimatorAttrId

The resource ID of the animation to execute when the TtPopOver is dismissed.

shouldHidePlatformSystemUi

If true the status and navigation bars will be hidden while the TtPopOver is displayed. If false the status and navigation bars will be visible while the TtPopOver is displayed.

onPopOverDismissedListener

The action to perform when the TtPopOver is dismissed.

onPopOverTouchOutsideListener

The action to perform when the user taps outside of the TtPopOver.

automaticDismissTimeoutMs

The timeout in milliseconds after which to automatically dismiss the TtPopOver. Any user interaction with the TtPopOver will reset the timeout. If null then the TtPopOver will not be dismissed automatically.