Most visited

Recently visited

Added in API level 1

ViewTreeObserver.OnGlobalFocusChangeListener

public static interface ViewTreeObserver.OnGlobalFocusChangeListener

android.view.ViewTreeObserver.OnGlobalFocusChangeListener
Known Indirect Subclasses


当视图树中的焦点状态更改时调用回调的接口定义。

Summary

Public methods

abstract void onGlobalFocusChanged(View oldFocus, View newFocus)

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

Public methods

onGlobalFocusChanged

Added in API level 1
void onGlobalFocusChanged (View oldFocus, 
                View newFocus)

在焦点在视图树中更改时调用的回调方法。 当视图树从触摸模式转换为非触摸模式时,oldFocus为空。 当视图树从非触摸模式转换为触摸模式时,newFocus为null。 当焦点在非触摸模式下改变(没有从或转换到触摸模式时),oldFocus或newFocus可以为空。

Parameters
oldFocus View: The previously focused view, if any.
newFocus View: The newly focused View, if any.

Hooray!