public class KPSwitchConflictUtil extends Object
KPSwitchRootLayoutHandler、
KPSwitchPanelLayoutHandler、KPSwitchFSPanelLayoutHandler
Any problems: https://github.com/Jacksgong/JKeyboardPanelSwitch| Modifier and Type | Class and Description |
|---|---|
static class |
KPSwitchConflictUtil.SubPanelAndTrigger |
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 focusView,
KPSwitchConflictUtil.SubPanelAndTrigger... subPanelAndTriggers)
|
static void |
attach(View panelLayout,
View focusView,
KPSwitchConflictUtil.SwitchClickListener switchClickListener,
KPSwitchConflictUtil.SubPanelAndTrigger... subPanelAndTriggers)
If you have multiple sub-panels in the
panelLayout, you can use this method to simply
attach them to non-layout-conflict. |
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 boolean |
isHandleByPlaceholder(boolean isFullScreen,
boolean isTranslucentStatus,
boolean isFitsSystem) |
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.attach(View, View, SwitchClickListener, SubPanelAndTrigger...)public static void attach(View panelLayout, View focusView, KPSwitchConflictUtil.SubPanelAndTrigger... subPanelAndTriggers)
public static void attach(View panelLayout, View focusView, KPSwitchConflictUtil.SwitchClickListener switchClickListener, KPSwitchConflictUtil.SubPanelAndTrigger... subPanelAndTriggers)
panelLayout, you can use this method to simply
attach them to non-layout-conflict. otherwise you can use attach(View, View, View)
or attach(View, View, View, SwitchClickListener).panelLayout - the layout of panel.focusView - the view will be focused or lose the focus.switchClickListener - the listener is used to listening whether the panel is showing or
keyboard is showing with toggle the panel/keyboard state.subPanelAndTriggers - the array of the trigger-toggle-view and
the sub-panel which bound trigger-toggle-view.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.public static boolean isHandleByPlaceholder(boolean isFullScreen,
boolean isTranslucentStatus,
boolean isFitsSystem)
isFullScreen - Whether in fullscreen theme.isTranslucentStatus - Whether in translucent status theme.isFitsSystem - Whether the root view(the child of the content view) is in
getFitSystemWindow() equal true.