Facebook Litho: Visible Event hasn't triggered when fragment resumed

300 Views Asked by At

Visible Event hasn't triggered when fragment resumed.

I also tried to call LithoView.setVisibilityHint(true); on fragment resume but it doesn't work to trigger the visible event of the Component.

However, it will be triggered successfully when scrolling up / down to show the component view in the RecyclerCollectionComponent.

1

There are 1 best solutions below

4
On

This is unfortunately a known problem right now. If you call LithoView#setVisibilityHint(true) on resume, you will have also needed to call LithoView.setVisibilityHint(false) in pause: in that case, you should get invisibility and visibility callbacks when you pause and resume, respectively.