public class KPSwitchConflictUtil extends Object
KPSwitchRootLayoutHandler、
KPSwitchPanelLayoutHandler、KPSwitchFSPanelLayoutHandler
Any problems: https://github.com/Jacksgong/JKeyboardPanelSwitch| Modifier and Type | Class and Description |
|---|---|
static interface |
KPSwitchConflictUtil.SwitchClickListener
This listener is used to listening the click event for a view which is received the click event
to switch between Panel and Keyboard.
|
| Constructor and Description |
|---|
KPSwitchConflictUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
attach(View panelLayout,
View switchPanelKeyboardBtn,
View focusView) |
static void |
attach(View panelLayout,
View switchPanelKeyboardBtn,
View focusView,
KPSwitchConflictUtil.SwitchClickListener switchClickListener)
Attach the action of
switchPanelKeyboardBtn and the focusView to
non-layout-conflict. |
static void |
hidePanelAndKeyboard(View panelLayout)
Hide the panel and the keyboard.
|
static void |
showKeyboard(View panelLayout,
View focusView)
To show the keyboard(hide the panel automatically if the panel is showing) with
non-layout-conflict.
|
static void |
showPanel(View panelLayout)
To show the panel(hide the keyboard automatically if the keyboard is showing) with
non-layout-conflict.
|
static boolean |
switchPanelAndKeyboard(View panelLayout,
View focusView)
If the keyboard is showing, then going to show the
panelLayout,
and hide the keyboard with non-layout-conflict. |
public static void attach(View panelLayout, View switchPanelKeyboardBtn, View focusView, KPSwitchConflictUtil.SwitchClickListener switchClickListener)
switchPanelKeyboardBtn and the focusView to
non-layout-conflict.
You do not have to use this method to attach non-layout-conflict, in other words, you can
attach the action by yourself with invoke methods manually: showPanel(View)、
showKeyboard(View, View)、hidePanelAndKeyboard(View), and in the case of don't
invoke this method to attach, and if your activity with the fullscreen-theme, please ensure your
panel layout is View.INVISIBLE before the keyboard is going to show.panelLayout - the layout of panel.switchPanelKeyboardBtn - the view will be used to trigger switching between the panel and
the keyboard.focusView - the view will be focused or lose the focus.switchClickListener - the click listener is used to listening the click event for
switchPanelKeyboardBtn.public static void showPanel(View panelLayout)
panelLayout - the layout of panel.KPSwitchPanelLayoutHandlerpublic static void showKeyboard(View panelLayout, View focusView)
panelLayout - the layout of panel.focusView - the view will be focused.public static boolean switchPanelAndKeyboard(View panelLayout, View focusView)
panelLayout,
and hide the keyboard with non-layout-conflict.
If the panel is showing, then going to show the keyboard,
and hide the panelLayout with non-layout-conflict.
If the panel and the keyboard are both hiding. then going to show the panelLayout
with non-layout-conflict.panelLayout - the layout of panel.focusView - the view will be focused or lose the focus.panelLayout; If false, switch to showing Keyboard.public static void hidePanelAndKeyboard(View panelLayout)
panelLayout - the layout of panel.