ViewTreeObserver.OnGlobalLayoutListener

Interface definition for a callback to be invoked when the global layout state or the visibility of views within the view tree changes.

一般用于在onCreate方法动态的获取组件的高度和宽度,因为只有在onResume方法中才可以获取View的高度。

你可能感兴趣的:(界面)