我需要知道用户何时触摸/点击/点击我的活动中的edittext.
如何在不中断事件的情况下执行此操作,以便键盘仍能正常显示?
(在操作系统显示键盘之前我需要了解它...如果可能的话)
Mat*_*adt 29
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;
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18198 次 |
| 最近记录: |