Most visited

Recently visited

Added in API level 18

ViewTreeObserver.OnWindowFocusChangeListener

public static interface ViewTreeObserver.OnWindowFocusChangeListener

android.view.ViewTreeObserver.OnWindowFocusChangeListener


当视图层次结构的窗口焦点状态改变时,将调用回调的接口定义。

Summary

Public methods

abstract void onWindowFocusChanged(boolean hasFocus)

回调方法在窗口焦点在视图树中更改时调用。

Public methods

onWindowFocusChanged

Added in API level 18
void onWindowFocusChanged (boolean hasFocus)

回调方法在窗口焦点在视图树中更改时调用。

Parameters
hasFocus boolean: Set to true if the window is gaining focus, false if it is losing focus.

Hooray!