isAdded : 在 onAttach (不包括)之后 onCreateView之前 就已经是 true;
isDetached :应该是对应 isAdded 的 调用 事务 detach 会 使fragmen走向ondestoryview 此时 返回true;
isHidden : 对应 事务管理的show 和 hidden
isRemoving: 对应事务的 remove remove操作 ondetach 周期时 就会 返回isremoveing不会影响isDetached的返回值;
isVisible :
return this.isAdded() && !this.isHidden() &&this.mView !=null &&this.mView.getWindowToken() !=null &&this.mView.getVisibility() ==0; 所以要在activityonresume之后 才有token 才能返回true;
网友评论