Code example for Fragment

Methods: setUserVisibleHint