1.

问题: 当工程底部有标签栏等控件时,点击编辑框软件盘会把底部栏顶到上面,

解决:在AndroidManifest上使用标签栏等控件的activity中加入:android:windowSoftInputMode="adjustPan"

要是想故意把控件提到软键盘的上面   解决:http://blog.csdn.net/yhqbsand/article/details/9066781

2.

弹出软键盘:

InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);  imm.toggleSoftInput(0, InputMethodManager.RESULT_SHOWN);  让软键盘消失: InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);  imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); 
很多应用中对于一个界面比如进入搜索界面或者修改信息等等情况,为了用户体验应该自动弹出软键盘而不是让用户主动点击输入框才弹出(因为用户进入该界面必然是为了更改信息)。具体实现这种效果如下:      EditText  editText.setFocusable(true);     editText.setFocusableInTouchMode(true);    editText.requestFocus();     InputMethodManager inputManager = (InputMethodManager)editText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);      inputManager.showSoftInput(editText, 0); 首先要对指定的输入框请求焦点。然后调用输入管理器弹出软键盘。

更多相关文章

  1. 利其器-Android(安卓)studio界面
  2. android —— 自定义控件 利用 ViewPage 实现滑动屏
  3. 一段android跳转到web界面的代码
  4. Android(安卓)Banner轮播控件
  5. MeasureSpec之详细分析
  6. Android基础入门教程——8.1.3 Android中的13种Drawable小结 Par
  7. Android使用ListView构造复杂页面,并响应点击事件,通过intent跳转
  8. Android(安卓)软键盘盖住输入框或者布局的解决办法
  9. Android(安卓)待机流程解析

随机推荐

  1. Android(安卓)SDK Manager连不上Google服
  2. Android23-视图坐标系以及MotionEvent事
  3. android给Button或TextView等设置字体
  4. Android(安卓)环境建立
  5. Android 登陆、提交数据或者加载数据时提
  6. Android中广告条轮播(Banner)的实现
  7. Android N for Developers(API概览)
  8. Android ApiDemos示例解析(95):Views->An
  9. Android开发:shape和selector和layer-list
  10. Android Service进程间双向通信之Messeng