Screen Fragments - onBeforeShow event implementation


Please could you consider implementing the onBeforeShow event listener for Screen Fragments as I feel this would be very useful when implementing Screen Fragments within Screens.



Right now, you can subscribe on parent events with Target.PARENT_CONTROLLER:

@Subscribe(target = Target.PARENT_CONTROLLER)
private void onBeforeShowHost(Screen.BeforeShowEvent event) {


Thank you for your reply Yuriy, but in my implementation this does not quite work for what I would like to achieve.

We have screen fragments that show and hide based on certain parameters and would like code to be run upon screen fragements being made visible.

Any way of currently performing this action?



What about AttachEvent?

Hi Konstantin,

I don’t believe that would work either because the fragment has already been initialised in the host screen as visible=false.

We have managed to achieve our desired functionality but thought this event might be useful for others (and the product’s functionality) in the future so I submitted it as an idea.

Thank you for your suggestion