Java Code Examples for android.view.Window#getCurrentFocus()

The following examples show how to use android.view.Window#getCurrentFocus() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KPSwitchFSPanelLayoutHandler.java    From imsdk-android with MIT License 5 votes vote down vote up
@Override
public void recordKeyboardStatus(Window window) {
    final View focusView = window.getCurrentFocus();
    if (focusView == null) {
        return;
    }

    if (isKeyboardShowing) {
        saveFocusView(focusView);
    } else {
        focusView.clearFocus();
    }
}
 
Example 2
Source File: KPSwitchFSPanelLayoutHandler.java    From letv with Apache License 2.0 5 votes vote down vote up
public void recordKeyboardStatus(Window window) {
    View focusView = window.getCurrentFocus();
    if (focusView != null) {
        if (this.isKeyboardShowing) {
            saveFocusView(focusView);
        } else {
            focusView.clearFocus();
        }
    }
}
 
Example 3
Source File: KPSwitchFSPanelLayoutHandler.java    From JKeyboardPanelSwitch with Apache License 2.0 5 votes vote down vote up
@Override
public void recordKeyboardStatus(Window window) {
    final View focusView = window.getCurrentFocus();
    if (focusView == null) {
        return;
    }

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