Code example for View

Methods: getViewTreeObserver, removeOnAttachStateChangeListener