Most visited

Recently visited

Added in API level 1

ViewGroup.OnHierarchyChangeListener

public static interface ViewGroup.OnHierarchyChangeListener

android.view.ViewGroup.OnHierarchyChangeListener
Known Indirect Subclasses


在此视图中的层次结构发生变化时调用回调的接口定义。 无论何时将小孩添加到此视图或从中移除,层次结构都会更改。

Summary

Public methods

abstract void onChildViewAdded(View parent, View child)

当新的孩子被添加到父视图时调用。

abstract void onChildViewRemoved(View parent, View child)

当孩子从父视图中移除时调用。

Public methods

onChildViewAdded

Added in API level 1
void onChildViewAdded (View parent, 
                View child)

当新的孩子被添加到父视图时调用。

Parameters
parent View: the view in which a child was added
child View: the new child view added in the hierarchy

onChildViewRemoved

Added in API level 1
void onChildViewRemoved (View parent, 
                View child)

当孩子从父视图中移除时调用。

Parameters
parent View: the view from which the child was removed
child View: the child removed from the hierarchy

Hooray!