I have some fragments that I need to run some animations when they get visible.
Those fragments are inside a ViewPager. Thanks to that answer - How to determine when Fragment becomes visible in ViewPager - I know that I get notified when my fragment is visible by the method getUserVisibleHint.
Because I have a lot of animations, I made custom views that know how to animate itself. And now I need to notify all the views inside the fragment in the method getUserVisibleHint of the fragment to they know that is time do animate themselves.
So my question is: How can I notify all the views inside a fragment?
Any solution is welcome, but how I said, the views that I need to notify are custom views created by me, so I believe that I need some kind of custom notification too.