public static boolean switchPanelAndKeyboard(final View panelLayout, final View focusView) {
        boolean switchToPanel = panelLayout.getVisibility() != View.VISIBLE;
        if (!switchToPanel) {
            showKeyboard(panelLayout, focusView);
        } else {
            showPanel(panelLayout);
        }

        return switchToPanel;
    }
public static boolean switchPanelAndKeyboard ( final View panelLayout , final View focusView ) { boolean switchToPanel = panelLayout . getVisibility ( ) != View . VISIBLE ; if ( ! switchToPanel ) { showKeyboard ( panelLayout , focusView ) ; } else { showPanel ( panelLayout ) ; } return switchToPanel ; }
If the keyboard is showing, then going to show the {@code panelLayout},
and hide the keyboard with non-layout-conflict.
<p/>
If the panel is showing, then going to show the keyboard,
and hide the {@code panelLayout} with non-layout-conflict.
<p/>
If the panel and the keyboard are both hiding. then going to show the {@code panelLayout}
with non-layout-conflict.

@param panelLayout the layout of panel.
@param focusView   the view will be focused or lose the focus.
@return If true, switch to showing {@code panelLayout}; If false, switch to showing Keyboard.