赞
踩
测试代码及其说明如下:
- /**
- * Use with setDefaultKeyMode to launch the dialer during default key
- * handling 将键盘所有的按键传递到拨号
- */
- setDefaultKeyMode(DEFAULT_KEYS_DIALER);
- /**
- * Use with setDefaultKeyMode to turn off default handling of keys.
- * 直接丢弃,这种情况你把键盘按穿了也不会有系统理你
- */
- setDefaultKeyMode(DEFAULT_KEYS_DISABLE);
- /**
- * Use with setDefaultKeyMode to specify that unhandled keystrokes will
- * start a global search (typically web search, but some platforms may
- * define alternate methods for global search) 将键盘输入作为搜索内容,进行全局搜索
- * 保证当前处于英文输入模式,可以通过呼出一个软键盘来改变当前输入模式。
- */
- setDefaultKeyMode(DEFAULT_KEYS_SEARCH_GLOBAL);
- /**
- * Use with setDefaultKeyMode to specify that unhandled keystrokes will
- * start an application-defined search. (If the application or activity
- * does not actually define a search, the the keys will be ignored.)
- * 将键盘输入作为搜索内容,进行本地搜索,如果本地没有实现自定义搜索,则会被忽略.
- */
- setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
- /**
- * Use with setDefaultKeyMode to execute a menu shortcut in default key
- * handling. That is, the user does not need to hold down the menu key to execute
- * menu shortcuts.
- * 将键盘输入作为当前窗体上注册的快捷键,进行快捷键处理
- */
- setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。