Jacksgong / JKeyboardPanelSwitch

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

edittext长按,action_up的时候 会自动弹出empty panel #62

Open Easy-Ez opened 7 years ago

Easy-Ez commented 7 years ago

从源码KPSwitchConflictUtil中看到 focusView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP) { /**

Easy-Ez commented 7 years ago

focusView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { mActionDownTime = SystemClock.elapsedRealtime(); } else if (event.getAction() == MotionEvent.ACTION_UP) { if (SystemClock.elapsedRealtime() - mActionDownTime < 500) { /**

暂时手动判断了下 不知道有什么副作用没

doublekill2020 commented 7 years ago

@sh1tge have fun