Jacksgong / JKeyboardPanelSwitch

For resolve the layout conflict when keybord & panel are switching (Android键盘面板冲突 布局闪动处理方案)
Apache License 2.0
4.18k stars 684 forks source link

panel和keyboard切换的时候会循环出现empty_panel,panel-keyboard-empty-panel-keyboard-empty-...... #71

Closed jueran closed 7 years ago

jueran commented 7 years ago

`` @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_chat, container, false); ButterKnife.bind(this, view); initRecyclerView(); initEmojiRecyclerView(); // panelRoot.setIgnoreRecommendHeight(true); KeyboardUtil.attach(getActivity(),panelRoot); KPSwitchConflictUtil.attach(panelRoot, chatFragmentEmoji, liveEdittext, new KPSwitchConflictUtil.SwitchClickListener() { @Override public void onClickSwitch(boolean switchToPanel) { } }); liveChatRecyclerview.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() == MotionEvent.ACTION_UP) { KPSwitchConflictUtil.hidePanelAndKeyboard(panelRoot); } return false; } }); return view; } launch-launchactivity-07312017104731

jueran commented 7 years ago

已解决,是因为,我的activity是全屏的,应该使用KPSwitchFSPanelRelativeLayout,但是我错误使用了KPSwitchPanelRelativeLayout。导致了这个问题