@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.softkey);buttonshow = (Button)findViewById(R.id.buttonshow);editshow = (EditText)findViewById(R.id.editshow);buttonshow.setOnClickListener(this);editshow.setOnClickListener(this);}/** *  *  *  *  * 输入法的使用 */@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.buttonshow:showKeyboard();break;case R.id.editshow:showKeyboard();break;default: break; }}private void showKeyboard() {InputMethodManager m=(InputMethodManager) (this.getBaseContext().getSystemService(INPUT_METHOD_SERVICE));m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);//m.hideSoftInputFromWindow(this.getWindow().getWindowStyle().get, 0);}}

更多相关文章

  1. Android 修改默认输入法
  2. Android 中文api (81)――InputMethod [输入法]
  3. Android EditText按下输入法软件的enter按键,实现跳到下一个EditT
  4. android 隐藏输入法
  5. Android关闭输入法
  6. android EditText和输入法相关知识总结
  7. TabHost随着输入法软键盘出现而上浮的问题
  8. android默认输入法设置
  9. Android定制出厂默认输入法(其他设置类似)

随机推荐

  1. Android的界面设计规范-5
  2. Android(安卓)APK安装后点击[打开]与[完成]的
  3. Android中asset文件夹和raw文件夹区别
  4. Android学习之Activity伪装成对话框形式)
  5. Flutter 插件开发:以微信SDK为例
  6. Delphi XE7下如何创建一个Android模拟器
  7. 谷歌Android碎片化严重:Android4.0份额仅
  8. Android分享到微信等社交平台教程
  9. Android图形系统分析与移植--四、Surface
  10. 摩托罗拉android产品 MT710