android fragment setuservisiblehint,in androidx.fragment.app.Fragment,setUserVisibleHint()is Depreca.
问题@OverridepublicvoidsetUserVisibleHint(booleanisVisibleToUser){super.setUserVisibleHint(isVisibleToUser);if(getUserVisibleHint()){isVisible=true;onVisible();}else{isVisible=false;onInVisible();}}Ifou