android中getViewTreeObserver在触发OnGlobalLayoutListener事件后为啥要移除监听器呢

【android中getViewTreeObserver在触发OnGlobalLayoutListener事件后为啥要移除监听器呢】

android中getViewTreeObserver在触发OnGlobalLayoutListener事件后为啥要移除监听器呢

文章插图
为什么android中的getViewTreeObserver会在触发OnGlobalBayoutListener事件后移除监听器?为什么android中的getViewTreeObserver会在触发OnGlobalBayoutListener事件后移除监听器?简介:比如android中的getViewTr为什么eeObserver在触发OnGlobalBayoutListener事件后调用RemoveOnGlobalLayoutListener方法移除监听器?