输入法键盘遮挡控件,有两种办法可以解决:

第一种:

在 AndroidManifest.xml中 找到对应activity在里面加上android:windowSoftInputMode="adjustPan",这样做了之后,键盘不会
遮挡输入框下面的控件。

第二种:


就是在 XML的顶级元素上加一层ScrollView

例如:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<include android:layout_width="fill_parent"
android:layout_height="wrap_content" layout="@layout/title_navi" />
<ViewFlipper android:id="@+id/vfSeason"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:persistentDrawingCache="animation" android:flipInterval="1000"
android:inAnimation="@anim/slide_in" android:outAnimation="@anim/slide_out">
<TableLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:stretchColumns="0">




</TableLayout>

</ViewFlipper>
</LinearLayout>
</ScrollView>


利用ScrollView在 最外层包一层,问题解决。 因为ScrollView中,所有的文本框在输入法面板弹出的时候都会自动的向上滚动。期望对大家有帮助







更多相关文章

  1. Android(安卓)studio 高级控件提示文本框与下拉框
  2. Android:控件布局(表格布局)TableLayout
  3. 【Android(安卓)界面效果18】Android软件开发之常用系统控件界面
  4. Android双向滑动控件
  5. Android(安卓)UI开发第三十四篇——SlidingPaneLayout
  6. Android:RelativeLayout 内容居中
  7. Android(安卓)popupwindow在指定控件正下方滑动弹出效果
  8. Android(安卓)TextView控件某个字符串特殊效果

随机推荐

  1. Android开发学习之Animation之Android帧
  2. Unity3d Android开发 Android(安卓)Devel
  3. 【Android经典入门教程-下(bill译)】
  4. AsyncTask机制详解
  5. windows中android SDK manager安装更新sd
  6. android中使用MediaPlayer播放视频
  7. Android(安卓)设置DrawableRight和Drawab
  8. Android(安卓)获取手机流量
  9. Linearlayout的android:divider属性
  10. Android利用Fiddler进行网络数据抓包