Java 类android.view.View.OnAttachStateChangeListener 实例源码

项目:GitHub    文件:ViewTargetTest.java   
@Implementation
public void addOnAttachStateChangeListener(OnAttachStateChangeListener listener) {
  attachStateListeners.add(listener);
}
项目:GitHub    文件:ViewTargetTest.java   
@Implementation
public void removeOnAttachStateChangeListener(OnAttachStateChangeListener listener) {
  attachStateListeners.remove(listener);
}
项目:GitHub    文件:ViewTargetTest.java   
@Implementation
public void onAttachedToWindow() {
  for (OnAttachStateChangeListener listener : attachStateListeners) {
    listener.onViewAttachedToWindow(view);
  }
}
项目:GitHub    文件:ViewTargetTest.java   
@Implementation
public void onDetachedFromWindow() {
  for (OnAttachStateChangeListener listener : attachStateListeners) {
    listener.onViewDetachedFromWindow(view);
  }
}
项目:AndroidViewHelper    文件:ViewWrapper.java   
/**
* @see View#removeOnAttachStateChangeListener(OnAttachStateChangeListener)
*/
 public W removeOnAttachStateChangeListener(OnAttachStateChangeListener listener) {
     mView.removeOnAttachStateChangeListener(listener);
     return (W)this;
 }
项目:AndroidViewHelper    文件:ViewWrapper.java   
/**
* @see View#addOnAttachStateChangeListener(OnAttachStateChangeListener)
*/
 public W addOnAttachStateChangeListener(OnAttachStateChangeListener listener) {
     mView.addOnAttachStateChangeListener(listener);
     return (W)this;
 }
项目:conductor-attacher    文件:ViewUtils.java   
private static List<OnAttachStateChangeListener> getAttachStateListeners(View view) {
    Object listenerInfo = ReflectionHelpers.callInstanceMethod(view, "getListenerInfo");
    return ReflectionHelpers.getField(listenerInfo, "mOnAttachStateChangeListeners");
}
项目:AbacusUtil    文件:Observer.java   
public Disposable onAttachStateChange(final OnAttachStateChangeListener onNext) {
    return onAttachStateChange(onNext, Fu.ON_ERROR_MISSING);
}
项目:AbacusUtil    文件:Observer.java   
public Disposable onAttachStateChange(final OnAttachStateChangeListener onNext, final Consumer<? super Exception> onError) {
    return onAttachStateChange(onNext, onError, Fu.EMPTY_ACTION);
}