对于那些需要填写很多内容的页面,使用ScrollView并滚动就方便了许多,ScrollView:

    <ScrollView        android:layout_width="match_parent"        android:layout_height="match_parent"        android:isScrollContainer="true">    </ScrollView>


一种办法是在AndroidManifest.xml设置ACTIVITY
android:windowSoftInputMode="adjustResize"


如果是fragment,只需要在代码里面控制
context.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);


补:这样设置的话,软键盘弹出和消失,都会有延时动作,建议加上背景,默认的是黑色无背景
context.getWindow().setBackgroundDrawableResource(XXXX);

更多相关文章

  1. LisetView Item高度设置无效
  2. Android(安卓)View动画——自定义View动画
  3. android 系统配置 常用命令 - linux
  4. 调用Android系统设置
  5. Robolectric使用(一)简单使用
  6. Android设置Toast长时间显示,及AlertDialog的使用
  7. 自定义实现横向圆角进度条——简易版
  8. Android提供的系统服务之--AlarmManager(闹钟服务)
  9. linux: 编译android源代码流程,以及linux环境变量设置。

随机推荐

  1. Android(安卓)29 创建文件夹失败
  2. Android8.1 Launcher3 去掉抽屉(一)
  3. android jni 学习笔记2
  4. Mac上配置gradle遇到的问题
  5. 关于自定义控件和属性时TypedArray.getDi
  6. spring cloud+spring boot+redis社交电子
  7. Android中的SurfaceTexture
  8. android sdcard的使用
  9. Android(安卓)Studio 打包生成正式apk(XXX
  10. Android模拟器学framework和driver之传感