public static interface ViewTreeObserver.OnGlobalFocusChangeListener
| android.view.ViewTreeObserver.OnGlobalFocusChangeListener |
| |
当视图树中的焦点状态更改时调用回调的接口定义。
公共方法(Public methods) |
|
|---|---|
abstract void |
onGlobalFocusChanged(View oldFocus, View newFocus) 在焦点在视图树中更改时调用的回调方法。 |
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. |