onBeforeDetachFromScreen

protected open fun onBeforeDetachFromScreen()

Override this function to be notified when the ui element is about to be detached from a screen

The screen an be still accessed via attachedToScreen