外层套一个ScrollView <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:background="@drawable/bg" android:layout_height="fill_parent" android:orientation="vertical"> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="fill_parent"      android:layout_height="fill_parent"><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent" android:orientation="vertical"> </RelativeLayout></ScrollView></LinearLayout> AndroidManifest.xml 相应的activity加入属性android:windowSoftInputMode="adjustPan"

今天做一个相机加一个文本框布局,文本在下面怎么输入,一输入软键盘把文本框挡住,在网上goole,找到上面一种方法,不行,于是翻网页找,终于解决。

代码方式:  getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE |                 WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);   xml方式: <activity android:name=".Activity.FilterActivity" android:label="@string/app_name" 
 android:windowSoftInputMode="stateHidden" android:screenOrientation="portrait" 
android:configChanges="keyboardHidden|orientation"            /> 

更多相关文章

  1. Android(安卓)WebView与 JS 的交互方式
  2. 如何在Android上安装apk软件
  3. Android之Button按钮
  4. android中使用 EditText 时,设定 inputType的一点说明
  5. 【Android常用控件】EditText常用属性【二】:为文本输入框指定软
  6. 【Android】EditText标签调用键盘
  7. ANDROID 输入法出现挤压屏幕、ANDROID输入键盘覆盖了屏幕控件的
  8. Android(安卓)SDK 证书没接受问题
  9. edittext底部输入

随机推荐

  1. ViewPager做出广告轮播特效
  2. NDK各版本下载
  3. Android(安卓)文件的选择
  4. Android的各种Drawable
  5. android解析json数组
  6. android:configChanges名词解析(文档翻译)
  7. android在service中使用AsyncHttpClient
  8. Android(安卓)SDK更新 Connection to htt
  9. Android(安卓)ndk 入门5 - opencv实现
  10. Android(安卓)Timer 更好方法