解决方法
txtEdit.setOnTouchListener(new View.OnTouchListener(){ public boolean onTouch(View view,MotionEvent motionEvent) { // your code here.... getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); return false; } });