How to intercept keystrokes on the virtual keyboard?
How to intercept button presses virtual keyboard in SurfaceView? Doing so. But nothing is impossible. Help please.
InputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVIC开发者_Python百科E);
inputMgr.toggleSoftInput(0, 0);
inputMgr.showSoftInput(mySurface, 0);
public class MySurface extends SurfaceView implements SurfaceHolder.Callback, View.OnTouchListener, OnKeyboardActionListener {...
You should implement TextWatcher class and set it up for all inout fields you are going to control. Unfortunately you can't implement generic soft keyboard presses interception. Look HERE
精彩评论