getCurrentFocus ( )源码实例Demo

android.view.Window#getCurrentFocus ( )源码实例Demo

下面列出了android.view.Window#getCurrentFocus ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@Override
public void recordKeyboardStatus(Window window) {
    final View focusView = window.getCurrentFocus();
    if (focusView == null) {
        return;
    }

    if (isKeyboardShowing) {
        saveFocusView(focusView);
    } else {
        focusView.clearFocus();
    }
}
 
源代码2 项目: letv   文件: KPSwitchFSPanelLayoutHandler.java
public void recordKeyboardStatus(Window window) {
    View focusView = window.getCurrentFocus();
    if (focusView != null) {
        if (this.isKeyboardShowing) {
            saveFocusView(focusView);
        } else {
            focusView.clearFocus();
        }
    }
}
 
@Override
public void recordKeyboardStatus(Window window) {
    final View focusView = window.getCurrentFocus();
    if (focusView == null) {
        return;
    }

    if (isKeyboardShowing) {
        saveFocusView(focusView);
    } else {
        focusView.clearFocus();
    }
}